From: Marc Kleine-Budde Date: Fri, 11 Mar 2022 11:27:43 +0000 (+0100) Subject: can: vxcan: vxcan_xmit(): use kfree_skb() instead of kfree() to free skb X-Git-Tag: v6.1-rc5~1746^2~97^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8;p=platform%2Fkernel%2Flinux-starfive.git can: vxcan: vxcan_xmit(): use kfree_skb() instead of kfree() to free skb This patch fixes the freeing of the "oskb", by using kfree_skb() instead of kfree(). Fixes: 1574481bb3de ("vxcan: remove sk reference in peer skb") Link: https://lore.kernel.org/all/20220311123741.382618-1-mkl@pengutronix.de Cc: Oliver Hartkopp Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 94a0c9c6a509..577a80300514 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -57,7 +57,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *oskb, struct net_device *dev) if (skb) { consume_skb(oskb); } else { - kfree(oskb); + kfree_skb(oskb); goto out_unlock; }