[PATCH 3/4] USB: gpio_vbus: put a missing regulator_put() on error

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

 



Note that regulator_put() doesn't care about whether ->vbus_draw is
valid or not.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@xxxxxxxxxxx>
---
 drivers/usb/otg/gpio_vbus.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
index 66af743..ac962ac 100644
--- a/drivers/usb/otg/gpio_vbus.c
+++ b/drivers/usb/otg/gpio_vbus.c
@@ -319,6 +319,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
 
 	return 0;
 err_otg:
+	regulator_put(gpio_vbus->vbus_draw);
 	free_irq(irq, pdev);
 err_irq:
 	if (gpio_is_valid(pdata->gpio_pullup))
-- 
1.7.10.1

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