usb: dwc2: gadget: fix gadget unregistration in udc_stop() function
[pandora-kernel.git] / drivers / usb / dwc2 / gadget.c
index 7f25527..5e548f7 100644 (file)
@@ -2937,9 +2937,7 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
 
        spin_lock_irqsave(&hsotg->lock, flags);
 
-       if (!driver)
-               hsotg->driver = NULL;
-
+       hsotg->driver = NULL;
        hsotg->gadget.speed = USB_SPEED_UNKNOWN;
 
        spin_unlock_irqrestore(&hsotg->lock, flags);