From cac0961474741a98b61e11e05e1388e6bc16744e Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Fri, 11 May 2012 17:25:51 +0300 Subject: [PATCH] usb: chipidea: drop redundant NULL check Currently, gadget can't be NULL in _gadget_stop_activity(). Signed-off-by: Alexander Shishkin Reported-by: Michael Grzeschik Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/udc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index ddd27d3443f8..bdb034420fc6 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -583,9 +583,6 @@ static int _gadget_stop_activity(struct usb_gadget *gadget) struct ci13xxx *udc = container_of(gadget, struct ci13xxx, gadget); unsigned long flags; - if (gadget == NULL) - return -EINVAL; - spin_lock_irqsave(&udc->lock, flags); udc->gadget.speed = USB_SPEED_UNKNOWN; udc->remote_wakeup = 0; -- 2.20.1