All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: rti-wdt: disable runtime pm in case of failure
@ 2020-11-25  7:51 Wang Li
  2020-11-25  7:53 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Li @ 2020-11-25  7:51 UTC (permalink / raw)
  To: wim, linux, krzk; +Cc: linux-watchdog, wangli74

In case of runtime pm failed, should disable runtime pm.

Fixes: d342951bcda6 ("watchdog: rti: Simplify with dev_err_probe()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Li <wangli74@huawei.com>
---
 drivers/watchdog/rti_wdt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index 836319cbaca9..8885841eef4f 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -227,8 +227,10 @@ static int rti_wdt_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 	ret = pm_runtime_get_sync(dev);
-	if (ret)
-		return dev_err_probe(dev, ret, "runtime pm failed\n");
+	if (ret) {
+		ret = dev_err_probe(dev, ret, "runtime pm failed\n");
+		goto err_iomap;
+	}
 
 	platform_set_drvdata(pdev, wdt);
 
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: rti-wdt: disable runtime pm in case of failure
  2020-11-25  7:51 [PATCH] watchdog: rti-wdt: disable runtime pm in case of failure Wang Li
@ 2020-11-25  7:53 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-25  7:53 UTC (permalink / raw)
  To: Wang Li; +Cc: wim, linux, linux-watchdog

On Wed, Nov 25, 2020 at 03:51:51PM +0800, Wang Li wrote:
> In case of runtime pm failed, should disable runtime pm.
> 
> Fixes: d342951bcda6 ("watchdog: rti: Simplify with dev_err_probe()")

The commit pointed here is wrong. The issue was not introduced there but
in earlier commit.

Best regards,
Krzysztof

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Li <wangli74@huawei.com>
> ---
>  drivers/watchdog/rti_wdt.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-25  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  7:51 [PATCH] watchdog: rti-wdt: disable runtime pm in case of failure Wang Li
2020-11-25  7:53 ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.