Browse Source

qcacld-3.0: Add NULL checks before use

Add NULL checks for variables before using them in functions.

Change-Id: I9b10daf6678451860d3fe0bea2d830cfb7c5fd95
CRs-Fixed: 2089858
Sravan Kumar Kairam 7 years ago
parent
commit
7b653b42be
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_driver_ops.c

+ 1 - 1
core/hdd/src/wlan_hdd_driver_ops.c

@@ -322,6 +322,7 @@ static void hdd_init_qdf_ctx(struct device *dev, void *bdev,
 	qdf_dev->drv_hdl = bdev;
 	qdf_dev->bus_type = bus_type;
 	qdf_dev->bid = bid;
+	cds_smmu_mem_map_setup(qdf_dev);
 }
 
 /**
@@ -390,7 +391,6 @@ static int wlan_hdd_probe(struct device *dev, void *bdev,
 		cds_set_load_in_progress(true);
 
 	hdd_init_qdf_ctx(dev, bdev, bus_type, (const struct hif_bus_id *)bid);
-	cds_smmu_mem_map_setup(cds_get_context(QDF_MODULE_ID_QDF_DEVICE));
 
 	if (reinit) {
 		ret = hdd_wlan_re_init();