qcacld-3.0: Fix possible null pointer dereference

Fix a possible null pointer dereference in wlan_hdd_cfg80211_ll_stats_get
and _wlan_hdd_cfg80211_get_station if global qdf device context becomes
null.

Change-Id: I02362ae2c60769a562acc42805bd8c4ccac0e887
CRs-fixed: 2536319
This commit is contained in:
Manikandan Mohan 2019-09-26 18:03:25 -07:00 • committed by nshrivas
commit 1f380148ad

View file

@ -1552,6 +1552,9 @@ int wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
int errno;
qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
if (!qdf_ctx)
return -EINVAL;
errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
if (errno)
return errno;
@ -4688,6 +4691,9 @@ static int _wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
if (errno)
return errno;
if (!qdf_ctx)
return -EINVAL;
errno = pld_qmi_send_get(qdf_ctx->dev);
if (errno)
return errno;