[PATCH] ASoC: amd: add missed checks for clk_get()
Mark Brown
broonie at kernel.org
Thu Dec 3 15:43:56 CET 2020
On Thu, Dec 03, 2020 at 10:31:16PM +0800, Chuhong Yuan wrote:
> da7219_dai_wclk = clk_get(component->dev, "da7219-dai-wclk");
> + if (IS_ERR(da7219_dai_wclk))
> + return PTR_ERR(da7219_dai_wclk);
> +
> da7219_dai_bclk = clk_get(component->dev, "da7219-dai-bclk");
> + if (IS_ERR(da7219_dai_bclk))
> + return PTR_ERR(da7219_dai_bclk);
This is also buggy - instead of ignoring the errors (which is an issue)
we now leak the wclk if the bclk fails. Probably should convert to devm
as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20201203/b5b3c521/attachment.sig>
More information about the Alsa-devel
mailing list