summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHangyu Hua <hbh25y@gmail.com>2022-02-28 11:36:39 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-03-31 10:55:27 +0300
commitc70222752228a62135cee3409dccefd494a24646 (patch)
tree9c650033daf8b280c01a88d81f7959e9b2a11908 /drivers/net
parent2e8e79c416aae1de224c0f1860f2e3350fa171f8 (diff)
downloadlinux-c70222752228a62135cee3409dccefd494a24646.tar.xz
can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
There is no need to call dev_kfree_skb() when usb_submit_urb() fails beacause can_put_echo_skb() deletes the original skb and can_free_echo_skb() deletes the cloned skb. Link: https://lore.kernel.org/all/20220228083639.38183-1-hbh25y@gmail.com Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Cc: stable@vger.kernel.org Cc: Sebastian Haas <haas@ems-wuensche.com> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/usb/ems_usb.c1
1 files changed, 0 insertions, 1 deletions
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);