Skip to content

Commit 90211b5

Browse files
SFxingyuwuWim Van Sebroeck
authored andcommitted
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: db728ea ("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>
1 parent 66efce1 commit 90211b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/watchdog/starfive-wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static int starfive_wdt_probe(struct platform_device *pdev)
492492
goto err_exit;
493493

494494
if (!early_enable)
495-
return pm_runtime_put_sync(&pdev->dev);
495+
pm_runtime_put_sync(&pdev->dev);
496496

497497
return 0;
498498

0 commit comments

Comments
 (0)