summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-09-26 01:48:14 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-26 02:51:41 +0200
commit97b0b1ad58fab9f71b1a6bc056a09af6065ec3bc (patch)
tree13eca210e2b092ab56070e9574e3e05af7b94306
parentbug: move WARN_ON() "cut here" into exception handler (diff)
downloadlinux-97b0b1ad58fab9f71b1a6bc056a09af6065ec3bc.tar.xz
linux-97b0b1ad58fab9f71b1a6bc056a09af6065ec3bc.zip
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 <elfring@users.sourceforge.net> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--ipc/mqueue.c2
1 files changed, 1 insertions, 1 deletions
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;