Преглед изворни кода

qcacld-3.0: reorder error checks in ipa_uc_ol_deinit

Reorder error checks in ipa_uc_ol_deinit, so it can
return immediately if IPA config is not enabled.

Change-Id: Ibf9f30650ce201eea562baf07b6dd9b83fd8dfff
CRs-Fixed: 2977474
Vevek Venkatesan пре 3 година
родитељ
комит
3ca1f5fff2
1 измењених фајлова са 9 додато и 9 уклоњено
  1. 9 9
      components/ipa/core/src/wlan_ipa_main.c

+ 9 - 9
components/ipa/core/src/wlan_ipa_main.c

@@ -575,23 +575,23 @@ QDF_STATUS ipa_uc_ol_deinit(struct wlan_objmgr_pdev *pdev)
 	struct wlan_ipa_priv *ipa_obj;
 	QDF_STATUS status;
 
-	ipa_obj = ipa_pdev_get_priv_obj(pdev);
-	if (!ipa_obj) {
-		ipa_err("IPA object is NULL");
-		return QDF_STATUS_E_FAILURE;
+	if (!ipa_config_is_enabled()) {
+		ipa_debug("ipa is disabled");
+		return QDF_STATUS_SUCCESS;
 	}
 
 	ipa_init_deinit_lock();
 
-	if (!ipa_config_is_enabled()) {
-		ipa_debug("ipa is disabled");
+	if (!ipa_cb_is_ready()) {
+		ipa_debug("ipa is not ready");
 		status = QDF_STATUS_SUCCESS;
 		goto out;
 	}
 
-	if (!ipa_cb_is_ready()) {
-		ipa_debug("ipa is not ready");
-		status = QDF_STATUS_SUCCESS;
+	ipa_obj = ipa_pdev_get_priv_obj(pdev);
+	if (!ipa_obj) {
+		ipa_err("IPA object is NULL");
+		status = QDF_STATUS_E_FAILURE;
 		goto out;
 	}