Parcourir la source

qcacld-3.0: Send the function return status up the call stack

hdd_wlan_clear_stats() invokes the function cdp_clear_stats(),
hdd_wlan_clear_stats() always returns 0 instead of returning the
callee return status.

Fix is to return the callee function return status up the call stack.

Change-Id: I591fb743d000463ffebd4207450de82ab7463a9c
CRs-Fixed: 2719088
Srinivas Girigowda il y a 4 ans
Parent
commit
589c525f8b
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      core/hdd/src/wlan_hdd_main.c

+ 2 - 2
core/hdd/src/wlan_hdd_main.c

@@ -9690,7 +9690,7 @@ int hdd_wlan_dump_stats(struct hdd_adapter *adapter, int stats_id)
 
 int hdd_wlan_clear_stats(struct hdd_adapter *adapter, int stats_id)
 {
-	QDF_STATUS status;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	hdd_debug("stats_id %d", stats_id);
 
@@ -9721,7 +9721,7 @@ int hdd_wlan_clear_stats(struct hdd_adapter *adapter, int stats_id)
 		break;
 	}
 
-	return 0;
+	return qdf_status_to_os_return(status);
 }
 
 void wlan_hdd_display_tx_rx_histogram(struct hdd_context *hdd_ctx)