From: <Claudiu.Beznea@microchip.com>
To: <walker.chen@starfivetech.com>, <broonie@kernel.org>,
<dan.carpenter@linaro.org>, <lgirdwood@gmail.com>,
<tiwai@suse.com>, <perex@perex.cz>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] ASoC: starfive: Fix an error check in jh7110_tdm_clk_reset_get()
Date: Fri, 9 Jun 2023 09:08:14 +0000 [thread overview]
Message-ID: <6b4811d5-3c64-9f9c-c7d9-d75b1eff98af@microchip.com> (raw)
In-Reply-To: <20230608135750.11041-2-walker.chen@starfivetech.com>
On 08.06.2023 16:57, Walker Chen wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Fix the check for devm_reset_control_array_get_exclusive() return value.
> The devm_reset_control_array_get_exclusive() function may return NULL if
> it's an optional request. If optional is intended then NULL should not
> be treated as an error case, but as a special kind of success case. So
> here the IS_ERR() is used to check better.
>
> Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
> ---
> Fix the following issue:
> https://lore.kernel.org/all/ZH7t6Nc+NTcGpq%2F3@moroto/
> ---
> sound/soc/starfive/jh7110_tdm.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/starfive/jh7110_tdm.c b/sound/soc/starfive/jh7110_tdm.c
> index 973b910d2d3e..a9a3d52bdd2a 100644
> --- a/sound/soc/starfive/jh7110_tdm.c
> +++ b/sound/soc/starfive/jh7110_tdm.c
> @@ -580,10 +580,9 @@ static int jh7110_tdm_clk_reset_get(struct platform_device *pdev,
> }
>
> tdm->resets = devm_reset_control_array_get_exclusive(&pdev->dev);
> - if (IS_ERR_OR_NULL(tdm->resets)) {
> - ret = PTR_ERR(tdm->resets);
> - dev_err(&pdev->dev, "Failed to get tdm resets");
> - return ret;
> + if (IS_ERR(tdm->resets)) {
> + dev_err(&pdev->dev, "Failed to get tdm resets\n");
There is an extra "\n" added to this to this patch which is not mentioned
anywhere. Just make sure to do one thing per patch. Other than this:
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> + return PTR_ERR(tdm->resets);
> }
>
> return 0;
> --
> 2.17.1
>
next prev parent reply other threads:[~2023-06-09 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 13:57 [PATCH v2 0/2] Fix error check and cleanup for JH7110 TDM Walker Chen
2023-06-08 13:57 ` [PATCH v2 1/2] ASoC: starfive: Fix an error check in jh7110_tdm_clk_reset_get() Walker Chen
2023-06-09 9:08 ` Claudiu.Beznea [this message]
2023-06-08 13:57 ` [PATCH v2 2/2] ASoC: starfive: Remove some unused macros Walker Chen
2023-06-09 9:08 ` Claudiu.Beznea
2023-06-09 12:14 ` [PATCH v2 0/2] Fix error check and cleanup for JH7110 TDM Mark Brown
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=6b4811d5-3c64-9f9c-c7d9-d75b1eff98af@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=walker.chen@starfivetech.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
all inboxes | Powered by JetHome®