[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210113002616.1501493-1-frkoenig@chromium.org>
Date: Wed, 13 Jan 2021 00:26:16 +0000
From: Fritz Koenig <frkoenig@...omium.org>
To: linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, stanimir.varbanov@...aro.org,
vgarodia@...eaurora.org, dikshita@...eaurora.org,
acourbot@...omium.org
Cc: Fritz Koenig <frkoenig@...omium.org>
Subject: [PATCH] venus: Check for valid device instance
core->dev_dec and core-dev->enc are set up
by the corresponding vdec_probe and venc_probe.
If the probe fails, they will not be set
and so could be null when venus_sys_error_handler
is called.
Fixes: 43e221e485e5 ("media: venus: Rework recovery mechanism")
Signed-off by: Fritz Koenig <frkoenig@...omium.org>
---
drivers/media/platform/qcom/venus/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index bdd293faaad0..979fcada4d3b 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -62,7 +62,8 @@ static void venus_sys_error_handler(struct work_struct *work)
mutex_lock(&core->lock);
- while (pm_runtime_active(core->dev_dec) || pm_runtime_active(core->dev_enc))
+ while ((core->dev_dec && pm_runtime_active(core->dev_dec)) ||
+ (core->dev_enc && pm_runtime_active(core->dev_enc)))
msleep(10);
venus_shutdown(core);
--
2.30.0.284.gd98b1dd5eaa7-goog
Powered by blists - more mailing lists