[PATCH net-next 05/13] driver: usb/gadget: remove unnecessary skb NULL check before calling dev_kfree_skb_irq
From: Govindarajulu Varadarajan
Date: Sat Nov 02 2013 - 09:48:47 EST
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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/