Browse Source

qcacmn: Fix for NULL check reference in hif_get_hal_handle()

Fixe for Null check dereferencing pointers

Change-Id: I706b5959a85ab381594d7cab7e7dba95435f85f5
CRs-Fixed: 2230161
Akshay Kosigi 7 years ago
parent
commit
0f345aee16
1 changed files with 4 additions and 0 deletions
  1. 4 0
      hif/src/hif_main.h

+ 4 - 0
hif/src/hif_main.h

@@ -210,6 +210,10 @@ struct hif_softc {
 static inline void *hif_get_hal_handle(void *hif_hdl)
 {
 	struct hif_softc *sc = (struct hif_softc *)hif_hdl;
+
+	if (!sc)
+		return NULL;
+
 	return sc->hal_soc;
 }