* [PATCH] netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
@ 2017-05-09 16:19 Colin King
2017-05-11 16:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-05-09 16:19 UTC (permalink / raw)
To: Manish Chopra, Rahul Verma, Dept-GELinuxNICDev, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
index b8d5270359cd..e30676515529 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
@@ -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;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
2017-05-09 16:19 [PATCH] netxen_nic: set rcode to the return status from the call to netxen_issue_cmd Colin King
@ 2017-05-11 16:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-05-11 16:16 UTC (permalink / raw)
To: colin.king
Cc: manish.chopra, rahul.verma, Dept-GELinuxNICDev, netdev,
kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 9 May 2017 17:19:42 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-11 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 16:19 [PATCH] netxen_nic: set rcode to the return status from the call to netxen_issue_cmd Colin King
2017-05-11 16:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).