[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YcIVe+dDoE4SWa3D@sirena.org.uk>
Date: Tue, 21 Dec 2021 17:57:15 +0000
From: Mark Brown <broonie@...nel.org>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: matthias.bgg@...il.com, lgirdwood@...il.com,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] isoc: mediatek: Check for error clk pointer
On Sat, Dec 18, 2021 at 01:30:05AM +0800, Jiasheng Jiang wrote:
> + for (i = CLK_NONE + 1; i < CLK_MAX; i++) {
> clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
> + if (IS_ERR(clk[i]))
> + return PTR_ERR(clk[i]);
This now pays attention to the error code here which is good but...
> - init_clks(pdev, clk);
> + ret = init_clks(pdev, clk);
> + if (ret)
> + return ERR_PTR(-ENOMEM);
...then discards it here with a random most likely inappropriate error
code.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists