From: Xingyu Wu <xingyu.wu@starfivetech.com>
To: <linux-watchdog@vger.kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>
Cc: Xingyu Wu <xingyu.wu@starfivetech.com>,
Samin Guo <samin.guo@starfivetech.com>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v2] watchdog: starfive: Fix the probe return error if PM and early_enable are both disabled
Date: Wed, 26 Apr 2023 11:12:16 +0800 [thread overview]
Message-ID: <20230426031216.37981-1-xingyu.wu@starfivetech.com> (raw)
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>
---
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
next reply other threads:[~2023-04-26 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 3:12 Xingyu Wu [this message]
2023-04-26 3:53 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230426031216.37981-1-xingyu.wu@starfivetech.com \
--to=xingyu.wu@starfivetech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=samin.guo@starfivetech.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®