Browse Source

Merge "qcacld-3.0: Avoid NULL dereference in hdd_init_qdf_ctx()" into wlan-cld3.driver.lnx.1.1-dev

Service qcabuildsw 8 years ago
parent
commit
550a52159d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/hdd/src/wlan_hdd_driver_ops.c

+ 5 - 0
core/hdd/src/wlan_hdd_driver_ops.c

@@ -294,6 +294,11 @@ void hdd_init_qdf_ctx(struct device *dev, void *bdev,
 {
 	qdf_device_t qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 
+	if (!qdf_dev) {
+		hdd_err("Invalid QDF device");
+		return;
+	}
+
 	qdf_dev->dev = dev;
 	qdf_dev->drv_hdl = bdev;
 	qdf_dev->bus_type = bus_type;