[PATCH] ath10k: Fix un-initialized debug objects.

Kalle Valo kvalo at qca.qualcomm.com
Fri Oct 25 23:58:33 EDT 2013

Ben Greear <greearb at candelatech.com> writes:

> On 10/25/2013 12:49 AM, Kalle Valo wrote:
>> greearb at candelatech.com writes:
>>>   	INIT_WORK(&ar->restart_work, ath10k_core_restart);
>>> +	ath10k_debug_init(ar);
>> For symmetry would it make more sense to move ath10k_debug_destroy() to
>> ath10k_core_unregister()? That way we could avoid adding a new function.
> In my opinion, you should initialize such things as early as possible
> so you don't have to worry so much about the various error cases leaving
> things un-initialized.  I believe my patch accomplished that.

Well, I again like symmetry and simplicity.

> What new function are you planning to avoid?

I would prefer not to create ath10k_debug_init().

What I was trying to suggest is this, I think it should fix the bug you
are seeing:

--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -738,8 +738,6 @@ EXPORT_SYMBOL(ath10k_core_create);
 void ath10k_core_destroy(struct ath10k *ar)
-       ath10k_debug_destroy(ar);
@@ -986,6 +984,8 @@ void ath10k_core_unregister(struct ath10k *ar)
+       ath10k_debug_destroy(ar);

Kalle Valo

More information about the ath10k mailing list