diff options
author | Zhaowei Yuan <zhaowei.yuan@samsung.com> | 2014-08-05 22:22:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 09:03:32 -0300 |
commit | 6c5c680b85deb98e1b90b5b3e112a6fa82c70b12 (patch) | |
tree | 002fdd4007f9a61e6e7b01e4e0fcca14831d03d9 /drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | |
parent | c44b6484db6e285cbc63bb8d400b5e8873e3a8d2 (diff) |
[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>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c index 31688cddfead..f88290556e2a 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c @@ -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; } |