Ver Fonte

qcacld-3.0: Add validation for wmi handle

Validate wmi handle obtained in tgt_fwol_pdev_param_send

Change-Id: I99edbdf5be4c17af7fb31b7cbdaf418e5a1150af
CRs-Fixed: 2699765
Bapiraju Alla há 4 anos atrás
pai
commit
cd65464616

+ 3 - 0
components/fw_offload/dispatcher/src/wlan_fwol_tgt_api.c

@@ -178,6 +178,9 @@ QDF_STATUS tgt_fwol_pdev_param_send(struct wlan_objmgr_pdev *pdev,
 {
 	struct wmi_unified *wmi_handle = get_wmi_unified_hdl_from_pdev(pdev);
 
+	if (!wmi_handle)
+		return QDF_STATUS_E_FAILURE;
+
 	return wmi_unified_pdev_param_send(wmi_handle, &pdev_param,
 					   FWOL_WILDCARD_PDEV_ID);
 }