qed: Fix an error code qed_ll2_start_xmit()
PATCH 1/1 qed: Fix an error code qed_ll2_start_xmit()
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 <[email protected]>
---
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(+)
drivers/net/ethernet/qlogic/qed/qed_ll2.c +1 -0
@@ -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; }
Signature · 1 line
2.17.1
From: Dan Carpenter <[email protected]>
Date: Mon, 17 Dec 2018 10:05:13 +0300
Quoted 5 lines
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 <[email protected]>
Applied.