Skip to content

Commit 0fe20fa

Browse files
Colin Ian Kingdavem330
authored andcommitted
netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
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: 2dcd5d9 ("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>
1 parent 8d66c30 commit 0fe20fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, int mtu)
247247
cmd.req.arg3 = 0;
248248

249249
if (recv_ctx->state == NX_HOST_CTX_STATE_ACTIVE)
250-
netxen_issue_cmd(adapter, &cmd);
250+
rcode = netxen_issue_cmd(adapter, &cmd);
251251

252252
if (rcode != NX_RCODE_SUCCESS)
253253
return -EIO;

0 commit comments

Comments
 (0)