]> git.hungrycats.org Git - linux/commit
watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 10 Feb 2018 10:17:27 +0000 (13:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 06:17:39 +0000 (08:17 +0200)
commit3fcb377f385447526fafd572a0d3dd2ace1f92da
treea8ed2ff4601482ed59418702a969b3b3945be010
parent1933da10ce5c9c33ea958228ed3f6a68899e439b
watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe()

[ Upstream commit 3c829f47e33eb0398a9a14e357a05199a7be0277 ]

If devm_reset_control_get_exclusive() fails, asm9260_wdt_probe()
returns immediately. But clks has been already enabled at that point,
so it is required to disable them or to move the code around.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/watchdog/asm9260_wdt.c