Thread (52 messages) 52 messages, 6 authors, 2021-03-03
STALE1916d

[PATCH 20/31] media: venus: fix error check in core_get_v4()

From: Yangtao Li <tiny.windzz@gmail.com>
Date: 2021-01-01 17:00:41
Also in: dri-devel, linux-arm-msm, linux-media, linux-mmc, linux-pm, linux-samsung-soc, linux-spi, linux-tegra, lkml
Subsystem: arm/qualcomm mailing list, media input infrastructure (v4l/dvb), qualcomm venus video accelerator driver, the rest · Maintainers: Mauro Carvalho Chehab, Vikash Garodia, Dikshita Agarwal, Linus Torvalds

Don't call dev_pm_opp_put_clkname() when got invalid OPP table
in device tree, since we do this in core_put_v4().

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/media/platform/qcom/venus/pm_helpers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index a3850261d697..59cbd6c39450 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -881,8 +881,9 @@ static int core_get_v4(struct device *dev)
 			core->has_opp_table = true;
 		} else if (ret != -ENODEV) {
 			dev_err(dev, "invalid OPP table in device tree\n");
-			dev_pm_opp_put_clkname(core->opp_table);
 			return ret;
+		} else {
+			dev_pm_opp_put_clkname(core->opp_table);
 		}
 	}
 
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help