Skip to content

Commit

Permalink
usb: musb: blackfin: call gpio_free() on error path in musb_platform_…
Browse files Browse the repository at this point in the history
…init()

Blackfin's musb_platform_init() needs to call gpio_free() for error cleanup iff
otg_get_transceiver() call returns NULL.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sergei Shtylyov authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 3daad24 commit 00be545
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/musb/blackfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data)

usb_nop_xceiv_register();
musb->xceiv = otg_get_transceiver();
if (!musb->xceiv)
if (!musb->xceiv) {
gpio_free(musb->config->gpio_vrsel);
return -ENODEV;
}

if (ANOMALY_05000346) {
bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);
Expand Down

0 comments on commit 00be545

Please sign in to comment.