lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Jun 2023 09:08:14 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <walker.chen@...rfivetech.com>, <broonie@...nel.org>,
        <dan.carpenter@...aro.org>, <lgirdwood@...il.com>,
        <tiwai@...e.com>, <perex@...ex.cz>
CC:     <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] ASoC: starfive: Fix an error check in
 jh7110_tdm_clk_reset_get()

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@...rfivetech.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@...rochip.com>


> +               return PTR_ERR(tdm->resets);
>         }
> 
>         return 0;
> --
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ