net/mctp/test/utils.c:15 mctp_test_dev_tx() error: use kfree_skb() here instead of kfree(skb)

From: Dan Carpenter
Date: Thu Nov 25 2021 - 02:07:46 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5f53fa508db098c9d372423a6dac31c8a5679cdf
commit: ded21b72299529cc143a4213ea0ec4b0c620b8eb mctp: Add test utils
config: x86_64-randconfig-m001-20211122 (https://download.01.org/0day-ci/archive/20211125/202111250652.KJ5iJFpx-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

smatch warnings:
net/mctp/test/utils.c:15 mctp_test_dev_tx() error: use kfree_skb() here instead of kfree(skb)

vim +15 net/mctp/test/utils.c

ded21b72299529c Jeremy Kerr 2021-10-03 12 static netdev_tx_t mctp_test_dev_tx(struct sk_buff *skb,
ded21b72299529c Jeremy Kerr 2021-10-03 13 struct net_device *ndev)
ded21b72299529c Jeremy Kerr 2021-10-03 14 {
ded21b72299529c Jeremy Kerr 2021-10-03 @15 kfree(skb);

This should be kfree_skb(skb);

ded21b72299529c Jeremy Kerr 2021-10-03 16 return NETDEV_TX_OK;
ded21b72299529c Jeremy Kerr 2021-10-03 17 }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx