Commit cac09614 authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Greg Kroah-Hartman

usb: chipidea: drop redundant NULL check

Currently, gadget can't be NULL in _gadget_stop_activity().
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Reported-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9322252
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment