Commit 6c5c680b authored by Zhaowei Yuan's avatar Zhaowei Yuan Committed by Mauro Carvalho Chehab

[media] media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm

ctx->ctx should be released if the following allocation for ctx->shm
gets failed.
Signed-off-by: default avatarZhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c44b6484
......@@ -228,6 +228,7 @@ static int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx *ctx)
ret = s5p_mfc_alloc_priv_buf(dev->mem_dev_l, &ctx->shm);
if (ret) {
mfc_err("Failed to allocate shared memory buffer\n");
s5p_mfc_release_priv_buf(dev->mem_dev_l, &ctx->ctx);
return ret;
}
......
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