Bladeren bron

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
Huashan Qu 4 jaren geleden
bovenliggende
commit
32aaa05ba7
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      umac/dcs/core/src/wlan_dcs.c

+ 1 - 1
umac/dcs/core/src/wlan_dcs.c

@@ -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,