media: staging: media: tegra-vde: add missing error return code in tegra_vde_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 22 May 2021 03:19:11 +0000 (05:19 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 12:12:55 +0000 (14:12 +0200)
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>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/tegra-vde/vde.c

index e025b69..ed4c125 100644 (file)
@@ -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);