From: Sunyoung Kang Date: Mon, 23 Jul 2018 05:59:31 +0000 (+0900) Subject: [COMMON] media: mfc: add to NULL check of itmon_info->master X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e849592f5be31b4d9bf86a707b2402f0acfc460;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: mfc: add to NULL check of itmon_info->master Change-Id: I1ef08db744cb1429337765bc5bc5096bed9d13c7 Signed-off-by: Sunyoung Kang --- 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;