[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220228083639.38183-1-hbh25y@gmail.com>
Date: Mon, 28 Feb 2022 16:36:39 +0800
From: Hangyu Hua <hbh25y@...il.com>
To: wg@...ndegger.com, mkl@...gutronix.de, davem@...emloft.net,
kuba@...nel.org, stefan.maetje@....eu, mailhol.vincent@...adoo.fr,
paskripkin@...il.com
Cc: linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Hangyu Hua <hbh25y@...il.com>
Subject: [PATCH] can: usb: delete a redundant dev_kfree_skb() in ems_usb_start_xmit()
There is no need to call dev_kfree_skb when usb_submit_urb fails beacause
can_put_echo_skb deletes original skb and can_free_echo_skb deletes the cloned
skb.
Signed-off-by: Hangyu Hua <hbh25y@...il.com>
---
drivers/net/can/usb/ems_usb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index 7bedceffdfa3..bbec3311d893 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -819,7 +819,6 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
usb_unanchor_urb(urb);
usb_free_coherent(dev->udev, size, buf, urb->transfer_dma);
- dev_kfree_skb(skb);
atomic_dec(&dev->active_tx_urbs);
--
2.25.1
Powered by blists - more mailing lists