From 5cf799148a093606a9a12ece2785585083bc6862 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Tue, 25 Nov 2014 16:02:47 -0800 Subject: qcacld: fix crash to check if IPA uC offload enabled when IPA is disabled Add to check if HDD IPA struct is not NULL before check IPA uC offload enable/disable since HDD IPA strcut is not initialized when IPA is disabled Change-Id: Ib90768ed3169f82abceb69e8cdfbd080ff615d65 CRs-fixed: 762197 --- CORE/HDD/src/wlan_hdd_ipa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c index 05848b490023..050e02a9e481 100644 --- a/CORE/HDD/src/wlan_hdd_ipa.c +++ b/CORE/HDD/src/wlan_hdd_ipa.c @@ -441,7 +441,7 @@ bool hdd_ipa_is_enabled(hdd_context_t *hdd_ctx) static inline bool hdd_ipa_uc_is_enabled(struct hdd_ipa_priv *hdd_ipa) { #ifdef IPA_UC_OFFLOAD - return hdd_ipa->hdd_ctx->cfg_ini->IpaUcOffloadEnabled; + return (hdd_ipa && hdd_ipa->hdd_ctx->cfg_ini->IpaUcOffloadEnabled); #else return false; #endif /* IPA_UC_OFFLOAD */ -- cgit v1.2.3