linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe()
@ 2018-08-28 20:40 Alexey Khoroshilov
  2018-08-29 12:04 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2018-08-28 20:40 UTC (permalink / raw)
  To: Hoan Tran, Linus Walleij
  Cc: Alexey Khoroshilov, linux-gpio, linux-kernel, ldv-project

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>
---
 drivers/gpio/gpio-dwapb.c | 1 +
 1 file changed, 1 insertion(+)

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)
 out_unregister:
 	dwapb_gpio_unregister(gpio);
 	dwapb_irq_teardown(gpio);
+	clk_disable_unprepare(gpio->clk);
 
 	return err;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe()
  2018-08-28 20:40 [PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe() Alexey Khoroshilov
@ 2018-08-29 12:04 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-08-29 12:04 UTC (permalink / raw)
  To: Alexey Khoroshilov
  Cc: Hoan Tran, open list:GPIO SUBSYSTEM, linux-kernel@vger.kernel.org,
	ldv-project

On Tue, Aug 28, 2018 at 10:43 PM Alexey Khoroshilov
<khoroshilov@ispras.ru> wrote:

> 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>

Patch applied for fixes.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-29 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28 20:40 [PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe() Alexey Khoroshilov
2018-08-29 12:04 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).