From: Mark Brown <broonie@kernel.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: matthias.bgg@gmail.com, lgirdwood@gmail.com,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isoc: mediatek: Check for error clk pointer
Date: Tue, 21 Dec 2021 17:57:15 +0000 [thread overview]
Message-ID: <YcIVe+dDoE4SWa3D@sirena.org.uk> (raw)
In-Reply-To: <20211217173005.698876-1-jiasheng@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-12-21 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 17:30 [PATCH] isoc: mediatek: Check for error clk pointer Jiasheng Jiang
2021-12-21 17:57 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YcIVe+dDoE4SWa3D@sirena.org.uk \
--to=broonie@kernel.org \
--cc=jiasheng@iscas.ac.cn \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox