Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure
@ 2020-11-25  8:29 Wang Li
  2020-11-25  8:39 ` Krzysztof Kozlowski
  2020-11-25 14:15 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Li @ 2020-11-25  8:29 UTC (permalink / raw)
  To: wim, linux, krzk; +Cc: linux-watchdog, wangli74

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

Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Li <wangli74@huawei.com>
---
Changelog:
v2
- Change the fix tag.
---
 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	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure
  2020-11-25  8:29 [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure Wang Li
@ 2020-11-25  8:39 ` Krzysztof Kozlowski
  2020-11-25 14:15 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-25  8:39 UTC (permalink / raw)
  To: Wang Li; +Cc: wim, linux, linux-watchdog

On Wed, Nov 25, 2020 at 04:29:56PM +0800, Wang Li wrote:
> In case of runtime pm failed, should disable runtime pm.
> 
> Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Li <wangli74@huawei.com>
> ---
> Changelog:
> v2
> - Change the fix tag.
> ---
>  drivers/watchdog/rti_wdt.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure
  2020-11-25  8:29 [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure Wang Li
  2020-11-25  8:39 ` Krzysztof Kozlowski
@ 2020-11-25 14:15 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2020-11-25 14:15 UTC (permalink / raw)
  To: Wang Li; +Cc: wim, krzk, linux-watchdog

On Wed, Nov 25, 2020 at 04:29:56PM +0800, Wang Li wrote:
> In case of runtime pm failed, should disable runtime pm.
> 
> Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Li <wangli74@huawei.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Changelog:
> v2
> - Change the fix tag.
> ---
>  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	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  8:29 [PATCH v2] watchdog: rti-wdt: disable runtime pm in case of failure Wang Li
2020-11-25  8:39 ` Krzysztof Kozlowski
2020-11-25 14:15 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git