[COMMON] media: mfc: check the NULL pointer
authorAyoung Sim <a.sim@samsung.com>
Fri, 20 Jul 2018 00:22:54 +0000 (09:22 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:04:34 +0000 (17:04 +0900)
Change-Id: Ia0b9d2cc6ba5ed69821712bf33c86cefc5af1ae5
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
drivers/media/platform/exynos/mfc/mfc_watchdog.c

index 88a4d94272ec8cf561201bf3299da85aa3414aed..7bd48b433bfab1720552ae76d01f6d5683c5720f 100644 (file)
@@ -176,10 +176,11 @@ static void __mfc_dump_state(struct mfc_dev *dev)
                        dev->shutdown, dev->sleep, dev->itmon_notified);
        pr_err("options debug_level:%d, debug_mode:%d, mmcache:%d, perf_boost:%d\n",
                        debug_level, dev->pdata->debug_mode, dev->mmcache.is_on_status, perf_boost_mode);
-       pr_err("NAL-Q state:%d, exception:%d, in_exe_cnt: %d, out_exe_cnt: %d\n",
-                       nal_q_handle->nal_q_state, nal_q_handle->nal_q_exception,
-                       nal_q_handle->nal_q_in_handle->in_exe_count,
-                       nal_q_handle->nal_q_out_handle->out_exe_count);
+       if (nal_q_handle)
+               pr_err("NAL-Q state:%d, exception:%d, in_exe_cnt: %d, out_exe_cnt: %d\n",
+                               nal_q_handle->nal_q_state, nal_q_handle->nal_q_exception,
+                               nal_q_handle->nal_q_in_handle->in_exe_count,
+                               nal_q_handle->nal_q_out_handle->out_exe_count);
 
        curr_ctx = __mfc_get_curr_ctx(dev);
        for (i = 0; i < MFC_NUM_CONTEXTS; i++)