On Wed, Jul 17, 2024 at 07:40:24PM +0800, Ma Ke wrote: > clk = clk_register_fixed_rate(dev, clk_name, parent_clk_name, 0, rate); > - if (!IS_ERR(clk)) > - of_clk_add_provider(np, of_clk_src_simple_get, clk); > + if (!IS_ERR(clk)) { > + ret = of_clk_add_provider(np, of_clk_src_simple_get, clk); > + if (ret) > + return ERR_PTR(ret); > + } This will leak clk if adding the provider fails.
Attachment:
signature.asc
Description: PGP signature
- References:
- Prev by Date: Re: [PATCH] ASoC: dt-bindings: ti,pcm512x: Convert to dtschema
- Next by Date: [PATCH v2] ASoC: dt-bindings: ti,pcm512x: Convert to dtschema
- Previous by thread: [PATCH] ASoC: ak4642: Return of_clk_add_provider to transfer the error
- Next by thread: [PATCH] ASoC: rt5682s: Return devm_of_clk_add_hw_provider to transfer the error
- Index(es):