diff options
author | Zhaowei Yuan <zhaowei.yuan@samsung.com> | 2014-08-01 14:05:41 +0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-13 15:37:15 +0900 |
commit | c34c9643d8f6bdb693769e8b4624a45b0dcf0704 (patch) | |
tree | 2be7ec7a8ca67adbe622432d9151212b4b664800 | |
parent | 6155b334ecd3950c73409678a557b44d5ba38989 (diff) | |
download | linux-3.10-c34c9643d8f6bdb693769e8b4624a45b0dcf0704.tar.gz linux-3.10-c34c9643d8f6bdb693769e8b4624a45b0dcf0704.tar.bz2 linux-3.10-c34c9643d8f6bdb693769e8b4624a45b0dcf0704.zip |
media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm
ctx->ctx should be released when the following allocation for ctx->shm fails.
Change-Id: I55372f8360db4605a65f633393b97c0ba2ee47d6
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
-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 3315c48648b..422a3720a4b 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; } |