qed: Fix an error code qed_ll2_start_xmit()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Dec 2018 07:05:13 +0000 (10:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:01:00 +0000 (10:01 +0100)
[ Upstream commit f07d4276892d97671e880190ff195a288b2d8d92 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_ll2.c

index 5f52f14761a30472c8a483474256fdb70d6c3861..b73bcbeb5f27977957a5aae3833860e5268a11ca 100644 (file)
@@ -2351,6 +2351,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;
                }