Skip to content

Commit

Permalink
usb: musb: davinci.c: add missing unregister
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Felipe Balbi committed Apr 18, 2012
1 parent fc87e08 commit c67dd31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/musb/davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit c67dd31

Please sign in to comment.