summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
diff options
context:
space:
mode:
authorYuval Mintz2013-09-23 09:12:53 +0200
committerDavid S. Miller2013-09-23 22:17:05 +0200
commitd9d81862671a7d139a7944090a7fe4647fc8f8d8 (patch)
treef5f4ea0b8ef38819c146a3e031967d04ee643afd /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
parentbnx2x: add missing VF resource allocation during init (diff)
downloadkernel-qcow2-linux-d9d81862671a7d139a7944090a7fe4647fc8f8d8.tar.gz
kernel-qcow2-linux-d9d81862671a7d139a7944090a7fe4647fc8f8d8.tar.xz
kernel-qcow2-linux-d9d81862671a7d139a7944090a7fe4647fc8f8d8.zip
bnx2x: prevent masking error from cnic
During error flows while loading cnic the return value was incorrectly replaced by that of bnx2x_set_real_num_queues(); If that function was to finish successfully then the cnic would have mistakenly thought the load ended successfully, causing issues (& panics) later on. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 61726af1de6e..e66beff2704d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2481,8 +2481,7 @@ load_error_cnic2:
load_error_cnic1:
bnx2x_napi_disable_cnic(bp);
/* Update the number of queues without the cnic queues */
- rc = bnx2x_set_real_num_queues(bp, 0);
- if (rc)
+ if (bnx2x_set_real_num_queues(bp, 0))
BNX2X_ERR("Unable to set real_num_queues not including cnic\n");
load_error_cnic0:
BNX2X_ERR("CNIC-related load failed\n");