diff mbox series

[-next] mctp: test: use kfree_skb() instead of kfree()

Message ID 20211130031100.768032-1-yangyingliang@huawei.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [-next] mctp: test: use kfree_skb() instead of kfree() | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: matt@codeconstruct.com.au
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Yingliang Nov. 30, 2021, 3:11 a.m. UTC
Use kfree_skb() instead of kfree() to free sk_buff.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/mctp/test/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeremy Kerr Nov. 30, 2021, 3:27 a.m. UTC | #1
Hi Yang,

> Use kfree_skb() instead of kfree() to free sk_buff.

Thanks for the patch! We do already have this queued in -net though:

 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=d85195654470

(which should percolate to net-next in due course too).

Cheers,


Jeremy
diff mbox series

Patch

diff --git a/net/mctp/test/utils.c b/net/mctp/test/utils.c
index cc6b8803aa9d..7b7918702592 100644
--- a/net/mctp/test/utils.c
+++ b/net/mctp/test/utils.c
@@ -12,7 +12,7 @@ 
 static netdev_tx_t mctp_test_dev_tx(struct sk_buff *skb,
 				    struct net_device *ndev)
 {
-	kfree(skb);
+	kfree_skb(skb);
 	return NETDEV_TX_OK;
 }