summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-04-16 19:03:10 +0400
committerFelipe Balbi <balbi@ti.com>2012-04-18 14:50:54 +0400
commitc67dd31c5cc745e72d033c0e7d4a2da67c90cd88 (patch)
tree06538c0648113551c6d1b7152df092adfac7f272 /drivers/usb/musb
parentfc87e080e19fdeb1120ce274423fea7b2ec2f63e (diff)
downloadlinux-c67dd31c5cc745e72d033c0e7d4a2da67c90cd88.tar.xz
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: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/davinci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 97ab975fa442..768b4b55c816 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -386,7 +386,7 @@ static int davinci_musb_init(struct musb *musb)
usb_nop_xceiv_register();
musb->xceiv = usb_get_transceiver();
if (!musb->xceiv)
- return -ENODEV;
+ goto unregister;
musb->mregs += DAVINCI_BASE_OFFSET;
@@ -444,6 +444,7 @@ static int davinci_musb_init(struct musb *musb)
fail:
usb_put_transceiver(musb->xceiv);
+unregister:
usb_nop_xceiv_unregister();
return -ENODEV;
}