summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-04-16 17:03:10 +0200
committerFelipe Balbi <balbi@ti.com>2012-04-18 13:50:54 +0300
commitc67dd31c5cc745e72d033c0e7d4a2da67c90cd88 (patch)
tree06538c0648113551c6d1b7152df092adfac7f272 /drivers/usb
parentfc87e080e19fdeb1120ce274423fea7b2ec2f63e (diff)
downloadop-kernel-dev-c67dd31c5cc745e72d033c0e7d4a2da67c90cd88.zip
op-kernel-dev-c67dd31c5cc745e72d033c0e7d4a2da67c90cd88.tar.gz
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')
-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 97ab975..768b4b5 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;
}
OpenPOWER on IntegriCloud