qcacmn: Add null check for dcs_tx_ops pointer

In function wlan_dcs_cmd_send(), pointer dcs_tx_ops returned from
function call target_if_dcs_get_tx_ops() may be null and will be
dereferenced, it's an issue to dereference dcs_tx_ops without null
check.

Fix is to add null check for dcs_tx_ops pointer before use in
function wlan_dcs_cmd_send().

Change-Id: If82f31bd8f5096a4e6562131426510907555140d
CRs-Fixed: 2989520
This commit is contained in:
Huashan Qu
2021-07-13 18:14:03 +08:00
committed by Madan Koyyalamudi
parent 036b05b69e
commit 32aaa05ba7

View File

@@ -130,7 +130,7 @@ QDF_STATUS wlan_dcs_cmd_send(struct wlan_objmgr_psoc *psoc,
dcs_pdev_priv->dcs_host_params.dcs_enable_cfg;
dcs_tx_ops = target_if_dcs_get_tx_ops(psoc);
if (dcs_tx_ops->dcs_cmd_send) {
if (dcs_tx_ops && dcs_tx_ops->dcs_cmd_send) {
dcs_info("dcs_enable: %u, pdev_id: %u", dcs_enable, pdev_id);
return dcs_tx_ops->dcs_cmd_send(psoc,
pdev_id,