Skip to content

Commit 7f53907

Browse files
tititiou36Wim Van Sebroeck
authored andcommitted
watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe()
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: 65a3b69 ("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>
1 parent b23c1f8 commit 7f53907

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/watchdog/dw_wdt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
635635

636636
ret = dw_wdt_init_timeouts(dw_wdt, dev);
637637
if (ret)
638-
goto out_disable_clk;
638+
goto out_assert_rst;
639639

640640
wdd = &dw_wdt->wdd;
641641
wdd->ops = &dw_wdt_ops;
@@ -667,12 +667,15 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
667667

668668
ret = watchdog_register_device(wdd);
669669
if (ret)
670-
goto out_disable_pclk;
670+
goto out_assert_rst;
671671

672672
dw_wdt_dbgfs_init(dw_wdt);
673673

674674
return 0;
675675

676+
out_assert_rst:
677+
reset_control_assert(dw_wdt->rst);
678+
676679
out_disable_pclk:
677680
clk_disable_unprepare(dw_wdt->pclk);
678681

0 commit comments

Comments
 (0)