netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] qed: Fix an error code qed_ll2_start_xmit()
@ 2018-12-17  7:05 Dan Carpenter
  2018-12-18 23:45 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-12-17  7:05 UTC (permalink / raw)
  To: Mintz, Yuval, Ariel Elior
  Cc: everest-linux-l2, David S. Miller, netdev, kernel-janitors

We accidentally deleted the code to set "rc = -ENOMEM;" and this patch
adds it back.

Fixes: d2201a21598a ("qed: No need for LL2 frags indication")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---

I'm not totally sure about this patch.  Please review it carefully.

There are four callers of this function: qedi_data_avail(), qedf_xmit(),
qedf_fcoe_send_vlan_req() and qedf_fip_send().  Only qedi_data_avail()
checks the error code, and if it sees an error it calls kfree_skb().

 drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 504c8f71b61d..90afd514ffe1 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -2506,6 +2506,7 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb,
 		if (unlikely(dma_mapping_error(&cdev->pdev->dev, mapping))) {
 			DP_NOTICE(cdev,
 				  "Unable to map frag - dropping packet\n");
+			rc = -ENOMEM;
 			goto err;
 		}
 
-- 
2.17.1

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

* Re: [PATCH net] qed: Fix an error code qed_ll2_start_xmit()
  2018-12-17  7:05 [PATCH net] qed: Fix an error code qed_ll2_start_xmit() Dan Carpenter
@ 2018-12-18 23:45 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-18 23:45 UTC (permalink / raw)
  To: dan.carpenter
  Cc: Mintz, Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev,
	kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 17 Dec 2018 10:05:13 +0300

> We accidentally deleted the code to set "rc = -ENOMEM;" and this patch
> adds it back.
> 
> Fixes: d2201a21598a ("qed: No need for LL2 frags indication")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

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

end of thread, other threads:[~2018-12-18 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-17  7:05 [PATCH net] qed: Fix an error code qed_ll2_start_xmit() Dan Carpenter
2018-12-18 23:45 ` 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).