Browse Source

qcacld-3.0: Continue hdd_deconfigure_cds despite failures

Cleanup should ignore errors without modifying execution as much
as possible.  If one item was not initialized propperly the
driver should still try to cleanup the rest.  Also continue
the driver unload when this api returns an error.

Change-Id: Ifdda135fe1baaad39c14c1e3d0843ccf964554e0
CRs-Fixed: 1079503
Houston Hoffman 8 years ago
parent
commit
6640cf3cbe
1 changed files with 4 additions and 5 deletions
  1. 4 5
      core/hdd/src/wlan_hdd_main.c

+ 4 - 5
core/hdd/src/wlan_hdd_main.c

@@ -7711,6 +7711,7 @@ out:
 static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx)
 static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx)
 {
 {
 	QDF_STATUS qdf_status;
 	QDF_STATUS qdf_status;
+	int ret = 0;
 
 
 	ENTER();
 	ENTER();
 	/* De-register the SME callbacks */
 	/* De-register the SME callbacks */
@@ -7721,18 +7722,18 @@ static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx)
 	if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
 	if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
 		hdd_err("Failed to deinit policy manager");
 		hdd_err("Failed to deinit policy manager");
 		/* Proceed and complete the clean up */
 		/* Proceed and complete the clean up */
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 	}
 
 
 	qdf_status = cds_disable(hdd_ctx->pcds_context);
 	qdf_status = cds_disable(hdd_ctx->pcds_context);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("Failed to Disable the CDS Modules! :%d",
 		hdd_err("Failed to Disable the CDS Modules! :%d",
 			qdf_status);
 			qdf_status);
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 	}
 
 
 	EXIT();
 	EXIT();
-	return 0;
+	return ret;
 }
 }
 
 
 
 
@@ -7786,7 +7787,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx)
 			hdd_alert("Failed to de-configure CDS");
 			hdd_alert("Failed to de-configure CDS");
 			QDF_ASSERT(0);
 			QDF_ASSERT(0);
 			ret = -EINVAL;
 			ret = -EINVAL;
-			goto done;
 		}
 		}
 		hdd_info("successfully Disabled the CDS modules!");
 		hdd_info("successfully Disabled the CDS modules!");
 		hdd_ctx->driver_status = DRIVER_MODULES_OPENED;
 		hdd_ctx->driver_status = DRIVER_MODULES_OPENED;
@@ -7815,7 +7815,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx)
 	if (!hif_ctx) {
 	if (!hif_ctx) {
 		hdd_err("Hif context is Null");
 		hdd_err("Hif context is Null");
 		ret = -EINVAL;
 		ret = -EINVAL;
-		goto done;
 	}
 	}
 
 
 	hdd_hif_close(hif_ctx);
 	hdd_hif_close(hif_ctx);