All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Yang Li <yang.lee@linux.alibaba.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next v2] clk: renesas: fix return value and unused assignment
Date: Fri, 18 Jun 2021 13:19:57 +0200	[thread overview]
Message-ID: <CAMuHMdUb+mCONrv2bYc_z-fayVf+7ZnV58CZsg5p=g0yh8TAjw@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdX53h16UuaC8VobKX20_3dQS1Ve+3a8oqX-oYeT6vTi5w@mail.gmail.com>

On Thu, Jun 17, 2021 at 9:25 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Jun 17, 2021 at 4:22 AM Yang Li <yang.lee@linux.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@linux.alibaba.com>
> > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.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.

... and the now unused clk variable.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  reply	other threads:[~2021-06-18 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  2:22 [PATCH -next v2] clk: renesas: fix return value and unused assignment Yang Li
2021-06-17  7:25 ` Geert Uytterhoeven
2021-06-18 11:19   ` Geert Uytterhoeven [this message]
2021-06-18 11:40     ` Geert Uytterhoeven

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='CAMuHMdUb+mCONrv2bYc_z-fayVf+7ZnV58CZsg5p=g0yh8TAjw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=yang.lee@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.