usb: renesas_usbhs: gadget: remove extra check on udc_stop
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 9 Jul 2013 05:47:37 +0000 (22:47 -0700)
committerFelipe Balbi <balbi@ti.com>
Mon, 15 Jul 2013 10:01:24 +0000 (13:01 +0300)
usb_gadget_ops :: udc_stop might be called with driver = NULL since
511f3c5326eabe1ece35202a404c24c0aeacc246
(usb: gadget: udc-core: fix a regression during gadget driver unbinding)

Because of that, 2nd times insmod goes fail.
This patch fixes it up.

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/mod_gadget.c

index ed4949faa70d14502a6669a3fb35b6fb814b35c6..805940c373532bd4d548b5cf4d868ce4d75024ad 100644 (file)
@@ -855,10 +855,6 @@ static int usbhsg_gadget_stop(struct usb_gadget *gadget,
        struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
        struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
 
-       if (!driver             ||
-           !driver->unbind)
-               return -EINVAL;
-
        usbhsg_try_stop(priv, USBHSG_STATUS_REGISTERD);
        gpriv->driver = NULL;