Commit 00be545e authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

usb: musb: blackfin: call gpio_free() on error path in musb_platform_init()

Blackfin's musb_platform_init() needs to call gpio_free() for error cleanup iff
otg_get_transceiver() call returns NULL.
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3daad24d
...@@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data) ...@@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
usb_nop_xceiv_register(); usb_nop_xceiv_register();
musb->xceiv = otg_get_transceiver(); musb->xceiv = otg_get_transceiver();
if (!musb->xceiv) if (!musb->xceiv) {
gpio_free(musb->config->gpio_vrsel);
return -ENODEV; return -ENODEV;
}
if (ANOMALY_05000346) { if (ANOMALY_05000346) {
bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment