mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe()
[ Upstream commit7f53907506] The commit in Fixes has only updated the remove function and missed the error handling path of the probe. Add the missing reset_control_assert() call. Fixes:65a3b6935d("watchdog: dw_wdt: get reset lines from dt") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/fbb650650bbb33a8fa2fd028c23157bedeed50e1.1682491863.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b36cc1c394
commit
cc4ae807db
@@ -637,7 +637,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = dw_wdt_init_timeouts(dw_wdt, dev);
|
ret = dw_wdt_init_timeouts(dw_wdt, dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_disable_clk;
|
goto out_assert_rst;
|
||||||
|
|
||||||
wdd = &dw_wdt->wdd;
|
wdd = &dw_wdt->wdd;
|
||||||
wdd->ops = &dw_wdt_ops;
|
wdd->ops = &dw_wdt_ops;
|
||||||
@@ -668,12 +668,15 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = watchdog_register_device(wdd);
|
ret = watchdog_register_device(wdd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_disable_pclk;
|
goto out_assert_rst;
|
||||||
|
|
||||||
dw_wdt_dbgfs_init(dw_wdt);
|
dw_wdt_dbgfs_init(dw_wdt);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
out_assert_rst:
|
||||||
|
reset_control_assert(dw_wdt->rst);
|
||||||
|
|
||||||
out_disable_pclk:
|
out_disable_pclk:
|
||||||
clk_disable_unprepare(dw_wdt->pclk);
|
clk_disable_unprepare(dw_wdt->pclk);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user