From: Sergei Shtylyov Date: Wed, 29 Sep 2010 06:54:31 +0000 (+0300) Subject: usb: musb: blackfin: call gpio_free() on error path in musb_platform_init() X-Git-Tag: v2.6.33.8~403 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d5ecedd26ef34071322434d53fa2f900aa1d87bd;p=karo-tx-linux.git usb: musb: blackfin: call gpio_free() on error path in musb_platform_init() commit 00be545e49d83485d49a598d3b7e090088934be8 upstream. 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 Acked-by: Mike Frysinger Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index ad26e6569665..e278b07cc579 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -298,8 +298,10 @@ int __init musb_platform_init(struct musb *musb) 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);