]> Git Repo - J-linux.git/commitdiff
watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe()
authorChristophe JAILLET <[email protected]>
Wed, 26 Apr 2023 06:52:48 +0000 (08:52 +0200)
committerWim Van Sebroeck <[email protected]>
Sat, 29 Apr 2023 06:08:41 +0000 (08:08 +0200)
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: 65a3b6935d92 ("watchdog: dw_wdt: get reset lines from dt")
Signed-off-by: Christophe JAILLET <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/fbb650650bbb33a8fa2fd028c23157bedeed50e1.1682491863.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
drivers/watchdog/dw_wdt.c

index 6f88bd81f8a1ea6128d0acb9a57768376db4d20a..a1354a59eb37b37e95899a19117da6a25ffddd4c 100644 (file)
@@ -635,7 +635,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
 
        ret = dw_wdt_init_timeouts(dw_wdt, dev);
        if (ret)
-               goto out_disable_clk;
+               goto out_assert_rst;
 
        wdd = &dw_wdt->wdd;
        wdd->ops = &dw_wdt_ops;
@@ -667,12 +667,15 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
 
        ret = watchdog_register_device(wdd);
        if (ret)
-               goto out_disable_pclk;
+               goto out_assert_rst;
 
        dw_wdt_dbgfs_init(dw_wdt);
 
        return 0;
 
+out_assert_rst:
+       reset_control_assert(dw_wdt->rst);
+
 out_disable_pclk:
        clk_disable_unprepare(dw_wdt->pclk);
 
This page took 0.053636 seconds and 4 git commands to generate.