[COMMON] media: mfc: add to NULL check of itmon_info->master
authorSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 05:59:31 +0000 (14:59 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:04:35 +0000 (17:04 +0900)
Change-Id: I1ef08db744cb1429337765bc5bc5096bed9d13c7
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
drivers/media/platform/exynos/mfc/mfc.c

index 2e2563b59509baddc473b76bd26f016b201ece84..659b4f7039a20576e047bf5cdf5f7029e7656823 100644 (file)
@@ -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;