From 5e138ea5a29484934b8198aa5f056e7b6a46ecfc Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 18 May 2018 19:59:07 +0530 Subject: [PATCH] qcacld-3.0: Avoid NULL check for context in class A stats cb In hdd_get_class_a_statistics_cb api, context is actually cookie and it can be NULL if this is the first request. on class A stats request, when hdd_get_class_a_statistics_cb is invoked with context as NULL, the NULL check in callback will not update the latest stats result and will return. Change-Id: I8c33a0e82d9915a4b3d76e695ceab7ecd9301b89 CRs-Fixed: 2244767 --- core/hdd/src/wlan_hdd_stats.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 338537bce616..52000d22b9fd 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -5628,9 +5628,8 @@ static void hdd_get_class_a_statistics_cb(void *stats, void *context) tCsrGlobalClassAStatsInfo *returned_stats; hdd_enter(); - if ((NULL == stats) || (NULL == context)) { - hdd_err("Bad param, stats [%pK] context [%pK]", - stats, context); + if (NULL == stats) { + hdd_err("Bad param, stats"); return; }