1
0

qcacmn: Add null check on wmi_handle

This change adds a NULL check on wmi_hdl before
dereferencing.

Change-Id: If00db0c56f33a910f698588f38c4219a4cd5bbf8
CRs-Fixed: 3491231
Este cometimento está contido em:
Namita Nair
2023-05-09 14:27:11 -07:00
cometido por Madan Koyyalamudi
ascendente 488ebc9cd9
cometimento 401b28e1b8

Ver ficheiro

@@ -897,6 +897,12 @@ cdp_ipa_opt_dp_enable_disable_low_power_mode(struct wlan_objmgr_pdev *pdev,
psoc = wlan_pdev_get_psoc(pdev);
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"Unable to get wmi handle");
return QDF_STATUS_E_NULL_VALUE;
}
pdev_wmi_handle = pdev->tgt_if_handle->wmi_handle;
qdf_mem_set(&pparam, sizeof(pparam), 0);
pparam.is_host_pdev_id = false;