All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] staging: media: tegra-vde: add missing error return code in tegra_vde_probe()
@ 2021-05-22  3:19 Yang Yingliang
  2021-05-22 14:16 ` Dmitry Osipenko
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-05-22  3:19 UTC (permalink / raw)
  To: linux-kernel, linux-staging, linux-tegra, linux-media; +Cc: mchehab, digetx

Add missing return error code when pm_runtime_resume_and_get() failed.

Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/staging/media/tegra-vde/vde.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
index e025b69776f2..ed4c1250b303 100644
--- a/drivers/staging/media/tegra-vde/vde.c
+++ b/drivers/staging/media/tegra-vde/vde.c
@@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
 	 * power-cycle it in order to put hardware into a predictable lower
 	 * power state.
 	 */
-	if (pm_runtime_resume_and_get(dev) < 0)
+	err = pm_runtime_resume_and_get(dev);
+	if (err)
 		goto err_pm_runtime;
 
 	pm_runtime_put(dev);
-- 
2.25.1


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

* Re: [PATCH -next] staging: media: tegra-vde: add missing error return code in tegra_vde_probe()
  2021-05-22  3:19 [PATCH -next] staging: media: tegra-vde: add missing error return code in tegra_vde_probe() Yang Yingliang
@ 2021-05-22 14:16 ` Dmitry Osipenko
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2021-05-22 14:16 UTC (permalink / raw)
  To: Yang Yingliang, linux-kernel, linux-staging, linux-tegra,
	linux-media, Dan Carpenter, Mauro Carvalho Chehab

22.05.2021 06:19, Yang Yingliang пишет:
> Add missing return error code when pm_runtime_resume_and_get() failed.
> 
> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/staging/media/tegra-vde/vde.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
> index e025b69776f2..ed4c1250b303 100644
> --- a/drivers/staging/media/tegra-vde/vde.c
> +++ b/drivers/staging/media/tegra-vde/vde.c
> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>  	 * power-cycle it in order to put hardware into a predictable lower
>  	 * power state.
>  	 */
> -	if (pm_runtime_resume_and_get(dev) < 0)
> +	err = pm_runtime_resume_and_get(dev);
> +	if (err)
>  		goto err_pm_runtime;
>  
>  	pm_runtime_put(dev);
> 

Hello Yang,

Thank you for the patch. The problem was already reported by Dan
Carpenter to the original patch, apparently Mauro missed it.

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

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

end of thread, other threads:[~2021-05-22 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22  3:19 [PATCH -next] staging: media: tegra-vde: add missing error return code in tegra_vde_probe() Yang Yingliang
2021-05-22 14:16 ` Dmitry Osipenko

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.