From: Xingyu Wu Date: Wed, 26 Apr 2023 03:12:16 +0000 (+0800) Subject: watchdog: starfive: Fix the probe return error if PM and early_enable are both disabled X-Git-Tag: v6.6.17~4918^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90211b58828924577b589e59814f53aec4557fb9;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230426031216.37981-1-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c index 1995cce..8f37890 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;