From c6a908477a3d1c459934271e438fb614ddeb6c1e Mon Sep 17 00:00:00 2001 From: "seungmin.ahn" Date: Tue, 18 Jun 2019 14:12:55 +0900 Subject: [PATCH] [RAMEN9610-19721][COMMON] media: mfc: fix the prevent issue Fixed null pointer dereference(FORWARD_NULL) Change-Id: Idb8f7f271d49ce0ac936e0885bd868d7eb94ea39 Signed-off-by: seungmin.ahn --- drivers/media/platform/exynos/mfc/mfc_run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/mfc/mfc_run.c b/drivers/media/platform/exynos/mfc/mfc_run.c index db344ff1245a..6ba29c0bd414 100644 --- a/drivers/media/platform/exynos/mfc/mfc_run.c +++ b/drivers/media/platform/exynos/mfc/mfc_run.c @@ -594,7 +594,7 @@ int mfc_run_enc_last_frames(struct mfc_ctx *ctx) mfc_set_enc_frame_buffer(ctx, 0, raw->num_planes); /* encoder dst buffer CFW PROT */ - if (ctx->is_drm) { + if (dst_mb && ctx->is_drm) { int index = dst_mb->vb.vb2_buf.index; mfc_stream_protect(ctx, dst_mb, index); -- 2.20.1