Эх сурвалжийг харах

qcacld-3.0: Set out psoc as NULL at the end of dsc psoc destroy

Currently host driver sets value of out psoc to NULL once it
assigns value of out_psoc to a local variable. Now if there is
any issue after this assignment, this global out_psoc is not
available for debugging purpose.
To debug some complex issues, set out_psoc to NULL at the end
of the psoc destroy function.

CRs-Fixed: 3469397
Change-Id: I479b0c4aedd77f374d8dff085cfade00a8e5cc5b
Ashish Kumar Dhanotiya 2 жил өмнө
parent
commit
d1a7b462dd

+ 3 - 2
components/dsc/src/wlan_dsc_psoc.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -80,8 +81,6 @@ static void __dsc_psoc_destroy(struct dsc_psoc **out_psoc)
 	if (!dsc_assert(psoc))
 		return;
 
-	*out_psoc = NULL;
-
 	/* assert no children */
 	dsc_assert(qdf_list_empty(&psoc->vdevs));
 
@@ -100,6 +99,8 @@ static void __dsc_psoc_destroy(struct dsc_psoc **out_psoc)
 	qdf_list_destroy(&psoc->vdevs);
 	psoc->driver = NULL;
 
+	*out_psoc = NULL;
+
 	qdf_tfree(psoc);
 }