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]
Message-ID: <CAMuHMdX53h16UuaC8VobKX20_3dQS1Ve+3a8oqX-oYeT6vTi5w@mail.gmail.com>
Date:   Thu, 17 Jun 2021 09:25:25 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Yang Li <yang.lee@...ux.alibaba.com>
Cc:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next v2] clk: renesas: fix return value and unused assignment

On Thu, Jun 17, 2021 at 4:22 AM Yang Li <yang.lee@...ux.alibaba.com> wrote:
> Currently the function returns NULL on error, so exact error code is lost.
> This patch changes return convention of the function to use ERR_PTR()
> on error instead.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
i.e. will queue in renesas-clk-for-v5.15.

> --- a/drivers/clk/renesas/renesas-rzg2l-cpg.c
> +++ b/drivers/clk/renesas/renesas-rzg2l-cpg.c
> @@ -182,8 +182,7 @@ static unsigned long rzg2l_cpg_pll_clk_recalc_rate(struct clk_hw *hw,
>
>         pll_clk = devm_kzalloc(dev, sizeof(*pll_clk), GFP_KERNEL);
>         if (!pll_clk) {
> -               clk = ERR_PTR(-ENOMEM);
> -               return NULL;
> +               return ERR_PTR(-ENOMEM);
>         }

I'll drop the curly braces while applying.

>
>         parent_name = __clk_get_name(parent);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ