lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230426031216.37981-1-xingyu.wu@starfivetech.com>
Date:   Wed, 26 Apr 2023 11:12:16 +0800
From:   Xingyu Wu <xingyu.wu@...rfivetech.com>
To:     <linux-watchdog@...r.kernel.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Guenter Roeck <linux@...ck-us.net>
CC:     Xingyu Wu <xingyu.wu@...rfivetech.com>,
        Samin Guo <samin.guo@...rfivetech.com>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] 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@...rfivetech.com>
---

Hi, Guenter and Wim,

This patch fixes the issue of StarFive watchdog driver and rebases on
the master branch of linux-next.

Thanks.

Changes since v1:
- Dropped the check of PM and used the 'pm_runtime_put_sync()' directly.

v1: https://lore.kernel.org/all/20230425100456.32718-1-xingyu.wu@starfivetech.com/
 
---
 drivers/watchdog/starfive-wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ