[PATCH] isoc: mediatek: Check for error clk pointer
Mark Brown
broonie at kernel.org
Tue Dec 21 09:57:15 PST 2021
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20211221/f4b6938e/attachment.sig>
More information about the Linux-mediatek
mailing list