Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c5c680b authored by Zhaowei Yuan's avatar Zhaowei Yuan Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarZhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c44b6484
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}