Re: [PATCH 06/21] ASoC: es8323: Move mclk acquisition to the i2c probe
From: Chancel Liu
Date: Mon Sep 21 2026 - 22:19:15 EST
On 9/21/2026 9:18 PM, Mark Brown wrote:
> On Mon, Sep 21, 2026 at 03:17:07PM +0200, Mark Brown wrote:
>> On Mon, Sep 21, 2026 at 07:46:25PM +0900, Chancel Liu wrote:
>>> From: Chancel Liu <chancel.liu@xxxxxxx>
>>>
>>> component->dev is the underlying i2c device whose devres is only
>>> released on physical device removal, not on ASoC card unbind. Getting
>>> the mclk with devm_clk_get_optional(component->dev, ...) in the
>>> component probe therefore leaks a clk reference on every card
>>> bind/unbind cycle.
>>>
>>> Move the devm_clk_get_optional() to es8323_i2c_probe() so the clk
>>> reference is tied to the i2c device lifetime.
>>
>> There's also some devm memory allocations in the DT parser which is run
>> in component probe.
>
> Sorry, meant to send this on the da7218.
Thanks for pointing it out. I overlooked these extra devm allocations in
the da7218 component probe. I'll fix it in the next revision.
BTW, I've re-checked the other codecs in the series and didn't find the
same pattern.
Regards,
Chancel Liu