[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190628130002.24293-6-stanimir.varbanov@linaro.org>
Date: Fri, 28 Jun 2019 15:59:56 +0300
From: Stanimir Varbanov <stanimir.varbanov@...aro.org>
To: linux-media@...r.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Vikash Garodia <vgarodia@...eaurora.org>,
Tomasz Figa <tfiga@...omium.org>,
Alexandre Courbot <acourbot@...omium.org>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>
Subject: [PATCH v2 05/11] venus: hfi: return an error if session_init is already called
This makes hfi_session_init to return an error when it is
already called without a call to hfi_session_deinit.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
---
drivers/media/platform/qcom/venus/hfi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c
index 82eb889ab541..3d8b1284d1f3 100644
--- a/drivers/media/platform/qcom/venus/hfi.c
+++ b/drivers/media/platform/qcom/venus/hfi.c
@@ -198,6 +198,9 @@ int hfi_session_init(struct venus_inst *inst, u32 pixfmt)
const struct hfi_ops *ops = core->ops;
int ret;
+ if (inst->state != INST_UNINIT)
+ return -EINVAL;
+
inst->hfi_codec = to_codec_type(pixfmt);
reinit_completion(&inst->done);
--
2.17.1
Powered by blists - more mailing lists