Skip to content

Commit

Permalink
USB: gpio_vbus: put a missing regulator_put() on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shinya Kuribayashi authored and Greg Kroah-Hartman committed May 14, 2012
1 parent 934ccec commit a6dc9cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/otg/gpio_vbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a6dc9cf

Please sign in to comment.