netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
authorColin Ian King <colin.king@canonical.com>
Tue, 9 May 2017 16:19:42 +0000 (17:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:47:54 +0000 (19:47 +0200)
commit014c8ea230972d327bb685d7d53cb7d7ff06b172
tree21670a8ec647d547afd40f0e8235271d5f8f6958
parent485c108e820d217a9ca597841d6e5667fa8c5e05
netxen_nic: set rcode to the return status from the call to netxen_issue_cmd

[ Upstream commit 0fe20fafd1791f993806d417048213ec57b81045 ]

Currently rcode is being initialized to NX_RCODE_SUCCESS and later it
is checked to see if it is not NX_RCODE_SUCCESS which is never true. It
appears that there is an unintentional missing assignment of rcode from
the return of the call to netxen_issue_cmd() that was dropped in
an earlier fix, so add it in.

Detected by CoverityScan, CID#401900 ("Logically dead code")

Fixes: 2dcd5d95ad6b2 ("netxen_nic: fix cdrp race condition")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c