From: Wei Yongjun Date: Tue, 2 Aug 2016 00:55:34 +0000 (+0000) Subject: qed: Fix error return code in qed_resc_alloc() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1b4985b5e8c308e0c2e2046f1bb8dc6180d45b9f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }