Re: [PATCH 2/2] MUSB: Blackfin: call gpio_free() on error path in musb_platform_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I wrote:

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@xxxxxxxxxxxxx>

Felipe, got your mail address wrong here as well. Here's the link to the archive: http://marc.info/?l=linux-usb&m=128568709810382

Index: linux-2.6/drivers/usb/musb/blackfin.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/blackfin.c
+++ linux-2.6/drivers/usb/musb/blackfin.c
@@ -342,8 +342,10 @@ int __init musb_platform_init(struct mus
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);

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux