diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-04-16 17:03:10 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-18 13:50:54 +0300 |
commit | c67dd31c5cc745e72d033c0e7d4a2da67c90cd88 (patch) | |
tree | 06538c0648113551c6d1b7152df092adfac7f272 /drivers/usb/musb/davinci.c | |
parent | fc87e080e19fdeb1120ce274423fea7b2ec2f63e (diff) |
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/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 3 |
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; } |