mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Reference in a new issue