mirror of
https://github.com/torvalds/linux.git
synced 2024-10-31 01:01:52 +00:00
usb: renesas_usbhs: gadget: remove extra check on udc_stop
usb_gadget_ops :: udc_stop might be called with driver = NULL since
511f3c5326
(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>
This commit is contained in:
parent
5257a6332e
commit
8047806e64
@ -855,10 +855,6 @@ static int usbhsg_gadget_stop(struct usb_gadget *gadget,
|
|||||||
struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
|
struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
|
||||||
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
||||||
|
|
||||||
if (!driver ||
|
|
||||||
!driver->unbind)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
usbhsg_try_stop(priv, USBHSG_STATUS_REGISTERD);
|
usbhsg_try_stop(priv, USBHSG_STATUS_REGISTERD);
|
||||||
gpriv->driver = NULL;
|
gpriv->driver = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user