Thread (4 messages) 4 messages, 2 authors, 2021-05-24

Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-05-24 13:29:55
Also in: dri-devel, kernel-janitors, linux-media, linux-tegra

24.05.2021 16:27, Dmitry Osipenko пишет:
24.05.2021 16:35, Wei Yongjun пишет:
quoted
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>
---
 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..321d14ba2e56 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 < 0)
 		goto err_pm_runtime;
 
 	pm_runtime_put(dev);
pm_runtime_resume_and_get() doesn't return positive values, the previous
variant was okay.

You should also version your patches and add changelog.
Ah, sorry. The other patch is from Yang Yingliang.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help