diff options
author | Stanimir Varbanov | 2019-01-16 11:41:14 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2019-08-05 10:51:28 -0300 |
commit | a367b9ab3eb5de3836af1ce2a6cae4d56e7de4bd (patch) | |
tree | b0982922fae1d2486c56cf734c798e417f736cfd /drivers/media/platform | |
parent | e42dbe8e86e89f77921bd117873604b9e26bbb19 (diff) |
media: 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@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/qcom/venus/hfi.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |