summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Devnani <sdevnani@qca.qualcomm.com>2014-10-23 11:54:48 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-10-23 13:16:27 -0700
commitbd915bba8bace4500935f9ee83a724bd2a4b824c (patch)
tree37c2c69ddcf52a8047c22fceb775dcf88d1941be
parent055110a3a3085f526c786854ea35459e7a17f103 (diff)
WLAN: add NULL check for sc->hostdef
Graceful return instead of crash Change-Id: Iba6b15b4df3338a795c9aeb62c740725985e3e52 CRs-Fixed: 744028
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index effa37c1c8b3..97e2f6f7dda9 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -256,6 +256,9 @@ hif_pci_device_reset(struct hif_pci_softc *sc)
int i;
u_int32_t val;
+ if (!sc->hostdef)
+ return;
+
/* NB: Don't check resetok here. This form of reset is integral to correct operation. */
if (!SOC_GLOBAL_RESET_ADDRESS) {