Commit c67dd31c authored by Julia Lawall's avatar Julia Lawall Committed by Felipe Balbi

usb: musb: davinci.c: add missing unregister

usb_nop_xceiv_unregister is needed on failure of usb_get_transceiver, as
done in other error-handling code in the same function.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent fc87e080
...@@ -386,7 +386,7 @@ static int davinci_musb_init(struct musb *musb) ...@@ -386,7 +386,7 @@ static int davinci_musb_init(struct musb *musb)
usb_nop_xceiv_register(); usb_nop_xceiv_register();
musb->xceiv = usb_get_transceiver(); musb->xceiv = usb_get_transceiver();
if (!musb->xceiv) if (!musb->xceiv)
return -ENODEV; goto unregister;
musb->mregs += DAVINCI_BASE_OFFSET; musb->mregs += DAVINCI_BASE_OFFSET;
...@@ -444,6 +444,7 @@ static int davinci_musb_init(struct musb *musb) ...@@ -444,6 +444,7 @@ static int davinci_musb_init(struct musb *musb)
fail: fail:
usb_put_transceiver(musb->xceiv); usb_put_transceiver(musb->xceiv);
unregister:
usb_nop_xceiv_unregister(); usb_nop_xceiv_unregister();
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment