Selaa lähdekoodia

qcacld-3.0: Fix error in populating oem data capabilities

Fix the error in populating oem data capabilities by fixing
incorrect conditional logic.

populate_oem_data_cap API returns zero on success and that
was misinterpreted as failure in the caller. Caller returns
without doing proper assignment.

Change-Id: I579106cb62c08622e8e5ab933747faf671a1d5cd
CRs-Fixed: 975352
Krishna Kumaar Natarajan 9 vuotta sitten
vanhempi
sitoutus
bc7e494559
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      core/hdd/src/wlan_hdd_oemdata.c

+ 3 - 1
core/hdd/src/wlan_hdd_oemdata.c

@@ -150,8 +150,10 @@ int iw_get_oem_data_cap(struct net_device *dev,
 		return ret;
 
 	status = populate_oem_data_cap(pAdapter, &oemDataCap);
-	if (!status)
+	if (0 != status) {
+		hdd_err("Failed to populate oem data capabilities");
 		return status;
+	}
 
 	pHddOemDataCap = (t_iw_oem_data_cap *) (extra);
 	*pHddOemDataCap = oemDataCap;