netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] qed: Fix error return code in qed_resc_alloc()
@ 2016-08-02  0:55 Wei Yongjun
  2016-08-02  4:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-02  0:55 UTC (permalink / raw)
  To: Yuval Mintz, Ariel Elior; +Cc: Wei Yongjun, everest-linux-l2, netdev

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>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 1a53c04..648c814 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;
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] qed: Fix error return code in qed_resc_alloc()
  2016-08-02  0:55 [PATCH -next] qed: Fix error return code in qed_resc_alloc() Wei Yongjun
@ 2016-08-02  4:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-02  4:37 UTC (permalink / raw)
  To: weiyj.lk; +Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Tue,  2 Aug 2016 00:55:34 +0000

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02  0:55 [PATCH -next] qed: Fix error return code in qed_resc_alloc() Wei Yongjun
2016-08-02  4:37 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).