Skip to content

Commit

Permalink
ieee802154-atusb: Delete an unnecessary check before the function cal…
Browse files Browse the repository at this point in the history
…l "kfree_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]>
Acked-by: Stefan Schmidt <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
elfring authored and holtmann committed Dec 11, 2015
1 parent 87a6b9b commit 4188146
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ieee802154/atusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ static void atusb_free_urbs(struct atusb *atusb)
urb = usb_get_from_anchor(&atusb->idle_urbs);
if (!urb)
break;
if (urb->context)
kfree_skb(urb->context);
kfree_skb(urb->context);
usb_free_urb(urb);
}
}
Expand Down

0 comments on commit 4188146

Please sign in to comment.