[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9861bf67-8b26-40a6-a7bf-875536ebe597@sirena.org.uk>
Date: Wed, 17 Jul 2024 13:56:57 +0100
From: Mark Brown <broonie@...nel.org>
To: Ma Ke <make24@...as.ac.cn>
Cc: lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
biju.das.jz@...renesas.com, jernej.skrabec@...il.com,
claudiu.beznea@...on.dev, robh@...nel.org,
kuninori.morimoto.gx@...esas.com, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: ak4642: Return of_clk_add_provider to transfer the
error
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists