diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-08-02 00:55:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-01 21:37:35 -0700 |
commit | 1b4985b5e8c308e0c2e2046f1bb8dc6180d45b9f (patch) | |
tree | 2e3dad57a87a6b849e26e1b95be2be4a253a597b /drivers/net/ethernet | |
parent | 43dcff349f091b6a2f5f491c35d89b173df41acf (diff) |
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/ethernet')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 |
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; } |