]> git.baikalelectronics.ru Git - kernel.git/commit
can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
authorHangyu Hua <hbh25y@gmail.com>
Fri, 11 Mar 2022 08:06:14 +0000 (16:06 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 31 Mar 2022 07:55:27 +0000 (09:55 +0200)
commit5944fa715996ec401c5f30c861e97c31b7d60489
treed01e3e7988cbb7823c75f9430e7dec4b5657693f
parent42ebe6f9732c83f5d7fcef46ebe67e25183a6a6a
can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path

There is no need to call dev_kfree_skb() when usb_submit_urb() fails
because can_put_echo_skb() deletes original skb and
can_free_echo_skb() deletes the cloned skb.

Fixes: ffa5f743af83 ("can: usb_8dev: Add support for USB2CAN interface from 8 devices")
Link: https://lore.kernel.org/all/20220311080614.45229-1-hbh25y@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/usb_8dev.c