lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: amd: add missed checks for clk_get()
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-12-03 15:45    [W:0.036 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site