qcacld-3.0: Add proper NULL check in wma_link_status_event_handler

Add proper NULL check for ht_info before accessing the structure. This
field is sent as a part of the event from FW and could be NULL.

Change-Id: I55dd7dcbe4ecdafe6a97ebcf2c7d9f08af30d8a2
CRs-Fixed: 2615175
This commit is contained in:
Sourav Mohapatra 2020-02-04 12:02:15 +05:30 • committed by nshrivas
commit 0d409ac1f0

View file

@ -2828,6 +2828,11 @@ int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
param_buf->fixed_param;
ht_info = (wmi_vdev_rate_ht_info *) param_buf->ht_info;
if (!ht_info) {
wma_err("Invalid ht_info");
return -EINVAL;
}
WMA_LOGD("num_vdev_stats: %d", event->num_vdev_stats);
if (event->num_vdev_stats > ((WMI_SVC_MSG_MAX_SIZE -