summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorXingyu Wu <xingyu.wu@starfivetech.com>2023-04-26 06:12:16 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2023-04-29 09:08:40 +0300
commit90211b58828924577b589e59814f53aec4557fb9 (patch)
treeb296d84d9a9e53ec3c64bd31d59a1a2dd026c1e6 /drivers/watchdog
parent66efce1d099a67d9d0bf635a9815ec478bfbc8a2 (diff)
downloadlinux-90211b58828924577b589e59814f53aec4557fb9.tar.xz
watchdog: starfive: Fix the probe return error if PM and early_enable are both disabled
When the starfive watchdog driver uses 'pm_runtime_put_sync()' as probe return value at last and 'early_enable' is disabled, it could return the error '-ENOSYS' if the CONFIG_PM is disabled, but the driver should works normally. Drop the 'return' and keep the 'pm_runtime_put_sync()', but do not use it as the return value. Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver") Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230426031216.37981-1-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/starfive-wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c
index 1995cceca51e..8f378900624d 100644
--- a/drivers/watchdog/starfive-wdt.c
+++ b/drivers/watchdog/starfive-wdt.c
@@ -492,7 +492,7 @@ static int starfive_wdt_probe(struct platform_device *pdev)
goto err_exit;
if (!early_enable)
- return pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_put_sync(&pdev->dev);
return 0;