From: Markus Elfring Date: Wed, 25 Sep 2019 23:48:14 +0000 (-0700) Subject: ipc/mqueue.c: delete an unnecessary check before the macro call dev_kfree_skb() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=97b0b1ad58fab9f71b1a6bc056a09af6065ec3bc;p=openwrt%2Fstaging%2Fblogic.git ipc/mqueue.c: delete an unnecessary check before the macro call dev_kfree_skb() dev_kfree_skb() input parameter validation, thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/07477187-63e5-cc80-34c1-32dd16b38e12@web.de Signed-off-by: Markus Elfring Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 7c15729d9d25..b02eb842b42e 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -1333,7 +1333,7 @@ out_fput: out: if (sock) netlink_detachskb(sock, nc); - else if (nc) + else dev_kfree_skb(nc); return ret;