Skip to content

Commit

Permalink
netxen_nic: set rcode to the return status from the call to netxen_is…
Browse files Browse the repository at this point in the history
…sue_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>
  • Loading branch information
Colin Ian King authored and David S. Miller committed May 11, 2017
1 parent 8d66c30 commit 0fe20fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, int mtu)
cmd.req.arg3 = 0;

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

if (rcode != NX_RCODE_SUCCESS)
return -EIO;
Expand Down

0 comments on commit 0fe20fa

Please sign in to comment.