diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 4424e7e4a532..cf4faa8d1457 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -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;