Commit a367b9ab authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab

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: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e42dbe8e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment