[COMMON] media: mfc: skip itmon_notifier if master is null.
authorJeonghee Kim <jhhhh.kim@samsung.com>
Mon, 28 May 2018 12:22:19 +0000 (21:22 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:23 +0000 (20:22 +0300)
The master information can has null value,
if a complicated itmon error occurs due to bus problem.
Skip itmon_notifier at this time.

Change-Id: I111aa765025da42fd1a8e6d5fd047bec677f9d99
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc.c

index a5956c130c49dea7406096ed085171bbff346862..3a7690822a676bee885f7666541ba12238d7390d 100644 (file)
@@ -1155,6 +1155,9 @@ static int mfc_itmon_notifier(struct notifier_block *nb, unsigned long action, v
        if (IS_ERR_OR_NULL(itmon_info))
                return NOTIFY_DONE;
 
+       if (!itmon_info->master)
+               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)) {