Prechádzať zdrojové kódy

qcacld-3.0: Move psoc destroy to hdd_context_destroy

Ida2b81eef0ebbfba2749ca89b63980201830a5e2 moved psoc create into
hdd_context_create(), however the destroy path remained as it was. This
caused a regression in the error path where the psoc was not cleaned up
in all cases. Move the psoc destroy into hdd_context_destroy to maintain
symmetry and avoid leaking the psoc under error conditions.

Change-Id: I3b16c9ea37dcf3e3b0ef262894aead5ff4fac59c
CRs-Fixed: 2342955
Dustin Brown 6 rokov pred
rodič
commit
db2df2e3d9
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      core/hdd/src/wlan_hdd_main.c

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

@@ -6871,6 +6871,8 @@ static void hdd_context_destroy(struct hdd_context *hdd_ctx)
 
 	hdd_context_deinit(hdd_ctx);
 
+	hdd_objmgr_release_and_destroy_psoc(hdd_ctx);
+
 	qdf_mem_free(hdd_ctx->config);
 	hdd_ctx->config = NULL;
 
@@ -7027,10 +7029,6 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
 	mutex_destroy(&hdd_ctx->avoid_freq_lock);
 #endif
 
-	driver_status = hdd_objmgr_release_and_destroy_psoc(hdd_ctx);
-	if (driver_status)
-		hdd_err("Psoc delete failed");
-
 	hdd_context_destroy(hdd_ctx);
 }