USB: gpio_vbus: put a missing regulator_put() on error
authorShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Thu, 10 May 2012 01:32:14 +0000 (10:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 16:02:23 +0000 (09:02 -0700)
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>
drivers/usb/otg/gpio_vbus.c

index 66af743..ac962ac 100644 (file)
@@ -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))