提交 cac09614 编写于 作者: A Alexander Shishkin 提交者: Greg Kroah-Hartman

usb: chipidea: drop redundant NULL check

Currently, gadget can't be NULL in _gadget_stop_activity().
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Reported-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b9322252
...@@ -583,9 +583,6 @@ static int _gadget_stop_activity(struct usb_gadget *gadget) ...@@ -583,9 +583,6 @@ static int _gadget_stop_activity(struct usb_gadget *gadget)
struct ci13xxx *udc = container_of(gadget, struct ci13xxx, gadget); struct ci13xxx *udc = container_of(gadget, struct ci13xxx, gadget);
unsigned long flags; unsigned long flags;
if (gadget == NULL)
return -EINVAL;
spin_lock_irqsave(&udc->lock, flags); spin_lock_irqsave(&udc->lock, flags);
udc->gadget.speed = USB_SPEED_UNKNOWN; udc->gadget.speed = USB_SPEED_UNKNOWN;
udc->remote_wakeup = 0; udc->remote_wakeup = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册