[PATCH v4 21/24] usb: chipidea: drop redundant NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Currently, gadget can't be NULL in _gadget_stop_activity().

Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Reported-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
 drivers/usb/chipidea/udc.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index b1bd1e2..5074d3c 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -607,9 +607,6 @@ static int _gadget_stop_activity(struct usb_gadget *gadget)
 	trace(udc->dev, "%p", gadget);
-	if (gadget == NULL)
-		return -EINVAL;
 	spin_lock_irqsave(&udc->lock, flags);
 	udc->gadget.speed = USB_SPEED_UNKNOWN;
 	udc->remote_wakeup = 0;

To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux