diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2018-08-28 16:40:26 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-08-29 08:04:04 -0400 |
commit | a618cf4800970d260871c159b7eec014a1da2e81 (patch) | |
tree | 545fad6d7bc009765548f0db89d3298f8bbf9fda /drivers | |
parent | 78d3a92edbfb02e8cb83173cad84c3f2d5e1f070 (diff) |
gpio: dwapb: Fix error handling in dwapb_gpio_probe()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 28da700f5f52..044888fd96a1 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c | |||
@@ -728,6 +728,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev) | |||
728 | out_unregister: | 728 | out_unregister: |
729 | dwapb_gpio_unregister(gpio); | 729 | dwapb_gpio_unregister(gpio); |
730 | dwapb_irq_teardown(gpio); | 730 | dwapb_irq_teardown(gpio); |
731 | clk_disable_unprepare(gpio->clk); | ||
731 | 732 | ||
732 | return err; | 733 | return err; |
733 | } | 734 | } |