Skip to contentSkip to conversation

qed: Fix an error code qed_ll2_start_xmit()

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 17, 2018 – Dec 18, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

---

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
index 504c8f71b61d..90afd514ffe1 100644
@@ -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