[media] media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Wed, 6 Aug 2014 01:22:08 +0000 (22:22 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 12:03:32 +0000 (09:03 -0300)
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>
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c

index 31688cddfead28f589f3320784d11caa7c6f6fd5..f88290556e2a28a90b9e6e35b7bff4d689f0e7c3 100644 (file)
@@ -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;
        }
 
This page took 0.02717 seconds and 5 git commands to generate.