Pārlūkot izejas kodu

qcacld-3.0: Call cds_sched_close in cds_open error path

When cds_open fails after calling cds_sched_open, cleanup is attempted.
However, cds_sched_close is currently protected by a faulty
conditional. Remove the conditional so the scheduler context can be
cleaned up appropriately for all cds_open failure modes.

Change-Id: I709e8d2af06ffdf1a2910d81d23fa3a33ffbe074
CRs-Fixed: 2129677
Dustin Brown 7 gadi atpakaļ
vecāks
revīzija
46a15a39bc
1 mainītis faili ar 4 papildinājumiem un 6 dzēšanām
  1. 4 6
      core/cds/src/cds_api.c

+ 4 - 6
core/cds/src/cds_api.c

@@ -645,12 +645,10 @@ err_bmi_close:
 	bmi_cleanup(ol_ctx);
 
 err_sched_close:
-	if (QDF_IS_STATUS_SUCCESS(qdf_status) &&
-	   (hdd_ctx->driver_status == DRIVER_MODULES_UNINITIALIZED ||
-	    cds_is_driver_recovering())) {
-		qdf_status = cds_sched_close();
-		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			hdd_err("Failed to close CDS Scheduler");
+	if (hdd_ctx->driver_status == DRIVER_MODULES_UNINITIALIZED ||
+	    cds_is_driver_recovering()) {
+		if (QDF_IS_STATUS_ERROR(cds_sched_close())) {
+			cds_err("Failed to close CDS Scheduler");
 			QDF_ASSERT(false);
 		}
 	}