diff options
| author | Yang Yingliang <[email protected]> | 2021-11-30 03:12:43 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-12-01 02:09:23 +0000 |
| commit | 5cfe53cfeb1c05b73e5f2e09d7fe3140b17c1204 (patch) | |
| tree | aa8165bfe31506004ee07e59ebb739149b810ac1 /net/mctp/af_mctp.c | |
| parent | net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc (diff) | |
| download | kernel-5cfe53cfeb1c05b73e5f2e09d7fe3140b17c1204.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mctp/af_mctp.c')
| -rw-r--r-- | net/mctp/af_mctp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index 871cf6266125..c921de63b494 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -405,8 +405,7 @@ static void mctp_sk_unhash(struct sock *sk) trace_mctp_key_release(key, MCTP_TRACE_KEY_CLOSED); spin_lock(&key->lock); - if (key->reasm_head) - kfree_skb(key->reasm_head); + kfree_skb(key->reasm_head); key->reasm_head = NULL; key->reasm_dead = true; key->valid = false; |
