From 220d00966f7b27f67cbaa4cb084d419672155ee3 Mon Sep 17 00:00:00 2001 From: Ayoung Sim Date: Fri, 20 Jul 2018 09:22:54 +0900 Subject: [PATCH] [COMMON] media: mfc: check the NULL pointer Change-Id: Ia0b9d2cc6ba5ed69821712bf33c86cefc5af1ae5 Signed-off-by: Ayoung Sim --- drivers/media/platform/exynos/mfc/mfc_watchdog.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/mfc_watchdog.c b/drivers/media/platform/exynos/mfc/mfc_watchdog.c index 88a4d94272ec..7bd48b433bfa 100644 --- a/drivers/media/platform/exynos/mfc/mfc_watchdog.c +++ b/drivers/media/platform/exynos/mfc/mfc_watchdog.c @@ -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++) -- 2.20.1