Prechádzať zdrojové kódy

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
Ashish Kumar Dhanotiya 6 rokov pred
rodič
commit
5e138ea5a2
1 zmenil súbory, kde vykonal 2 pridanie a 3 odobranie
  1. 2 3
      core/hdd/src/wlan_hdd_stats.c

+ 2 - 3
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;
 	}