[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: Zhaowei Yuan <zhaowei.yuan@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
c44b6484db
commit
6c5c680b85
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user