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>
This commit is contained in:
parent
e42dbe8e86
commit
a367b9ab3e
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user