Re: [PATCH 06/21] ASoC: es8323: Move mclk acquisition to the i2c probe

From: Mark Brown

Date: Mon Sep 21 2026 - 09:30:14 EST


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.

Attachment: signature.asc
Description: PGP signature