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
This commit is contained in:
Dustin Brown 2017-10-19 16:21:22 -07:00 • committed by snandini
commit 46a15a39bc

View file

@ -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);
}
}