From 1b4985b5e8c308e0c2e2046f1bb8dc6180d45b9f Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 2 Aug 2016 00:55:34 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/ethernet') 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; } -- cgit v1.2.3-70-g09d2