[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJiuCcdFiXVtECtVGz3N9oUM38ca=MDmdK4+T+peUKKzNr_5KQ@mail.gmail.com>
Date: Thu, 9 Jan 2020 10:14:00 +0100
From: Clément Péron <peron.clem@...il.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Thierry Reding <thierry.reding@...il.com>,
Maxime Ripard <mripard@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Linux PWM List <linux-pwm@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR
Hi Uwe, Gustavo,
On Thu, 9 Jan 2020 at 08:44, Uwe Kleine-König
<u.kleine-koenig@...gutronix.de> wrote:
>
> Hello Gustavo,
>
> On Thu, Jan 09, 2020 at 01:27:35AM -0600, Gustavo A. R. Silva wrote:
> > Fix inconsistent IS_ERR and PTR_ERR in sun4i_pwm_probe().
> >
> > The proper pointers to be passed as arguments are pwm->clk and pwm->bus_clk.
Thanks for the catch.
As these patches are still in next should we update them or apply a fix ?
Regards,
Clement
> >
> > This bug was detected with the help of Coccinelle.
> >
> > Fixes: b8d74644f34a ("pwm: sun4i: Prefer "mod" clock to unnamed")
> > Fixes: 5b090b430d75 ("pwm: sun4i: Add an optional probe for bus clock")
> > Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> > ---
> > drivers/pwm/pwm-sun4i.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> > index 1afd41ebd3fd..a805c347ee84 100644
> > --- a/drivers/pwm/pwm-sun4i.c
> > +++ b/drivers/pwm/pwm-sun4i.c
> > @@ -423,7 +423,7 @@ static int sun4i_pwm_probe(struct platform_device *pdev)
> > */
> > pwm->clk = devm_clk_get_optional(&pdev->dev, "mod");
> > if (IS_ERR(pwm->clk)) {
> > - if (PTR_ERR(pwm->rst) != -EPROBE_DEFER)
> > + if (PTR_ERR(pwm->clk) != -EPROBE_DEFER)
>
> How embarrassing that I didn't notice these. Thanks for catching.
>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
Powered by blists - more mailing lists