Skip to content

Commit

Permalink
usb: chipidea: drop redundant NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Shishkin authored and Greg Kroah-Hartman committed May 11, 2012
1 parent b932225 commit cac0961
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cac0961

Please sign in to comment.