From: Alexander Shishkin Date: Fri, 11 May 2012 14:25:51 +0000 (+0300) Subject: usb: chipidea: drop redundant NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cac0961474741a98b61e11e05e1388e6bc16744e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;