Skip to content

Commit

Permalink
gpio: dwapb: Fix error handling in dwapb_gpio_probe()
Browse files Browse the repository at this point in the history
If dwapb_gpio_add_port() fails in dwapb_gpio_probe(),
gpio->clk is left undisabled.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Alexey Khoroshilov authored and Linus Walleij committed Aug 29, 2018
1 parent 78d3a92 commit a618cf4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpio-dwapb.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev)
out_unregister:
dwapb_gpio_unregister(gpio);
dwapb_irq_teardown(gpio);
clk_disable_unprepare(gpio->clk);

return err;
}
Expand Down

0 comments on commit a618cf4

Please sign in to comment.