diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-11-30 04:12:43 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-01 03:09:23 +0100 |
commit | 5cfe53cfeb1c05b73e5f2e09d7fe3140b17c1204 (patch) | |
tree | aa8165bfe31506004ee07e59ebb739149b810ac1 /net/mctp/route.c | |
parent | net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc (diff) | |
download | linux-5cfe53cfeb1c05b73e5f2e09d7fe3140b17c1204.tar.xz linux-5cfe53cfeb1c05b73e5f2e09d7fe3140b17c1204.zip |
mctp: remove unnecessary check before calling kfree_skb()
The skb will be checked inside kfree_skb(), so remove the
outside check.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20211130031243.768823-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mctp/route.c')
-rw-r--r-- | net/mctp/route.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mctp/route.c b/net/mctp/route.c index 46c44823edb7..8d759b48f747 100644 --- a/net/mctp/route.c +++ b/net/mctp/route.c @@ -231,9 +231,7 @@ static void __mctp_key_unlock_drop(struct mctp_sk_key *key, struct net *net, /* and one for the local reference */ mctp_key_unref(key); - if (skb) - kfree_skb(skb); - + kfree_skb(skb); } #ifdef CONFIG_MCTP_FLOWS |