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/[email protected]
Signed-off-by: Markus Elfring <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Manfred Spraul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
elfring authored and 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.