提交 6c5c680b 编写于 作者: Z Zhaowei Yuan 提交者: 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: NZhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册