summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-02 03:55:34 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-02 07:37:35 +0300
commit1b4985b5e8c308e0c2e2046f1bb8dc6180d45b9f (patch)
tree2e3dad57a87a6b849e26e1b95be2be4a253a597b /drivers/net
parent43dcff349f091b6a2f5f491c35d89b173df41acf (diff)
downloadlinux-1b4985b5e8c308e0c2e2046f1bb8dc6180d45b9f.tar.xz
qed: Fix error return code in qed_resc_alloc()
Fix to return error code -EINVAL instead of 0 when EQ elements is too larger, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_dev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 0b47ab5d6fd9..0e4f4a9306b5 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -509,6 +509,7 @@ int qed_resc_alloc(struct qed_dev *cdev)
DP_ERR(p_hwfn,
"Cannot allocate 0x%x EQ elements. The maximum of a u16 chain is 0x%x\n",
n_eqes, 0xFFFF);
+ rc = -EINVAL;
goto alloc_err;
}