mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
usb: chipidea: drop redundant NULL check
Currently, gadget can't be NULL in _gadget_stop_activity(). Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b932225272
commit
cac0961474
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user