From: Hangyu Hua <hbh25y@gmail.com>
To: wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net,
kuba@kernel.org, stefan.maetje@esd.eu,
mailhol.vincent@wanadoo.fr, paskripkin@gmail.com
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Hangyu Hua <hbh25y@gmail.com>
Subject: [PATCH] can: usb: delete a redundant dev_kfree_skb() in ems_usb_start_xmit()
Date: Mon, 28 Feb 2022 16:36:39 +0800 [thread overview]
Message-ID: <20220228083639.38183-1-hbh25y@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2022-02-28 8:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 8:36 Hangyu Hua [this message]
2022-02-28 8:55 ` [PATCH] can: usb: delete a redundant dev_kfree_skb() in ems_usb_start_xmit() Marc Kleine-Budde
2022-02-28 10:44 ` Hangyu Hua
2022-02-28 10:45 ` Marc Kleine-Budde
2022-02-28 10:47 ` Hangyu Hua
2022-03-11 8:22 ` Hangyu Hua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220228083639.38183-1-hbh25y@gmail.com \
--to=hbh25y@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=paskripkin@gmail.com \
--cc=stefan.maetje@esd.eu \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox