summaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg/gpio_vbus.c
diff options
context:
space:
mode:
authorShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>2012-05-10 03:32:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 18:02:23 +0200
commita6dc9cf76b9c39ccffe083f09f995ce2502f5773 (patch)
tree592c850c522f2810f951e3843e3fce71223359b5 /drivers/usb/otg/gpio_vbus.c
parentUSB: gpio_vbus: provide an appropriate debounce interval (diff)
downloadlinux-a6dc9cf76b9c39ccffe083f09f995ce2502f5773.tar.xz
linux-a6dc9cf76b9c39ccffe083f09f995ce2502f5773.zip
USB: gpio_vbus: put a missing regulator_put() on error
Note that regulator_put() doesn't care about whether ->vbus_draw is valid or not. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/otg/gpio_vbus.c')
-rw-r--r--drivers/usb/otg/gpio_vbus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
index 66af743ec598..ac962acfbb18 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))