Skip to content

Commit

Permalink
mac802154: Delete an unnecessary check before the function call "kfre…
Browse files Browse the repository at this point in the history
…e_skb"

The kfree_skb() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
elfring authored and holtmann committed Nov 19, 2015
1 parent 7df0f73 commit 56f9ebe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/mac802154/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ __ieee802154_rx_handle_packet(struct ieee802154_local *local,
break;
}

if (skb)
kfree_skb(skb);
kfree_skb(skb);
}

static void
Expand Down

0 comments on commit 56f9ebe

Please sign in to comment.