Skip to content

Commit

Permalink
ipc/mqueue.c: delete an unnecessary check before the macro call dev_k…
Browse files Browse the repository at this point in the history
…free_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>
  • Loading branch information
Markus Elfring authored and Linus Torvalds committed Sep 26, 2019
1 parent a44f71a commit 97b0b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)
out:
if (sock)
netlink_detachskb(sock, nc);
else if (nc)
else
dev_kfree_skb(nc);

return ret;
Expand Down

0 comments on commit 97b0b1a

Please sign in to comment.