From 3e054dafab384672f3884a84b963bec0d92bcd1c Mon Sep 17 00:00:00 2001 From: Jaejoon Yoo Date: Tue, 23 Oct 2018 10:45:36 +0900 Subject: [PATCH] [RAMEN9610-8099] [COMMON] bcm: Add NULL check for variable initialized. Change-Id: I0ab18dbd890b9dfa1bdba03571fa84e34c7b4b6b Signed-off-by: Jaejoon Yoo --- drivers/soc/samsung/exynos-bcm_dbg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/samsung/exynos-bcm_dbg.c b/drivers/soc/samsung/exynos-bcm_dbg.c index 2ff0e169ff60..9cbc80b98179 100644 --- a/drivers/soc/samsung/exynos-bcm_dbg.c +++ b/drivers/soc/samsung/exynos-bcm_dbg.c @@ -1310,12 +1310,18 @@ void exynos_bcm_dbg_stop(unsigned int bcm_stop_owner) { int ret; + if (!bcm_dbg_data) { + BCM_ERR("bcm_dbg_data is not ready!\n"); + return; + } + #ifdef CONFIG_EXYNOS_BCM_DBG_GNR if (!bcm_dbg_data->bcm_load_bin) { BCM_ERR("BCM bin has not been loaded yet!!\n"); return; } #endif + if (bcm_stop_owner >= STOP_OWNER_MAX) { BCM_ERR("Invalid stop owner (%u)\n", bcm_stop_owner); return; -- 2.20.1