From 5e849592f5be31b4d9bf86a707b2402f0acfc460 Mon Sep 17 00:00:00 2001 From: Sunyoung Kang Date: Mon, 23 Jul 2018 14:59:31 +0900 Subject: [PATCH] [COMMON] media: mfc: add to NULL check of itmon_info->master Change-Id: I1ef08db744cb1429337765bc5bc5096bed9d13c7 Signed-off-by: Sunyoung Kang --- drivers/media/platform/exynos/mfc/mfc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/mfc.c b/drivers/media/platform/exynos/mfc/mfc.c index 2e2563b59509..659b4f7039a2 100644 --- a/drivers/media/platform/exynos/mfc/mfc.c +++ b/drivers/media/platform/exynos/mfc/mfc.c @@ -1209,10 +1209,13 @@ static int __mfc_itmon_notifier(struct notifier_block *nb, unsigned long action, return NOTIFY_DONE; /* print dump if it is an MFC ITMON error */ - if ((strncmp("MFC", itmon_info->port, sizeof("MFC") - 1) == 0) && - (strncmp("MFC", itmon_info->master, sizeof("MFC") - 1) == 0)) { - is_mfc_itmon = 1; - is_master = 1; + if (strncmp("MFC", itmon_info->port, sizeof("MFC") - 1) == 0) { + if (!itmon_info->master) + return NOTIFY_DONE; + if (strncmp("MFC", itmon_info->master, sizeof("MFC") - 1) == 0) { + is_mfc_itmon = 1; + is_master = 1; + } } else if (strncmp("MFC", itmon_info->dest, sizeof("MFC") - 1) == 0) { is_mfc_itmon = 1; is_master = 0; -- 2.20.1