dev_kfree_skb_irq is protected from NULL. No need to check for NULL while calling this function. Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@xxxxxxxxx> --- drivers/usb/gadget/f_phonet.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index eb3aa81..9e220b6 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c @@ -393,10 +393,8 @@ static void __pn_reset(struct usb_function *f) usb_ep_disable(fp->out_ep); usb_ep_disable(fp->in_ep); - if (fp->rx.skb) { - dev_kfree_skb_irq(fp->rx.skb); - fp->rx.skb = NULL; - } + dev_kfree_skb_irq(fp->rx.skb); + fp->rx.skb = NULL; } static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt) -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html