All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Clément Péron" <peron.clem@gmail.com>,
	"Jernej Skrabec" <jernej.skrabec@siol.net>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR
Date: Thu, 9 Jan 2020 08:44:45 +0100	[thread overview]
Message-ID: <20200109074445.73n3vapjl4vfjtsu@pengutronix.de> (raw)
In-Reply-To: <20200109072735.GA22886@embeddedor>

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.
> 
> 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@embeddedor.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@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: linux-pwm@vger.kernel.org,
	"Jernej Skrabec" <jernej.skrabec@siol.net>,
	linux-kernel@vger.kernel.org,
	"Maxime Ripard" <mripard@kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Clément Péron" <peron.clem@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR
Date: Thu, 9 Jan 2020 08:44:45 +0100	[thread overview]
Message-ID: <20200109074445.73n3vapjl4vfjtsu@pengutronix.de> (raw)
In-Reply-To: <20200109072735.GA22886@embeddedor>

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.
> 
> 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@embeddedor.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@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-09  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  7:27 [PATCH] pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2020-01-09  7:27 ` Gustavo A. R. Silva
2020-01-09  7:27 ` Gustavo A. R. Silva
2020-01-09  7:44 ` Uwe Kleine-König [this message]
2020-01-09  7:44   ` Uwe Kleine-König
2020-01-09  9:14   ` Clément Péron
2020-01-09  9:14     ` Clément Péron
2020-01-09 13:18     ` Uwe Kleine-König
2020-01-09 13:18       ` Uwe Kleine-König
2020-01-10  7:18 ` Uwe Kleine-König
2020-01-10  7:18   ` Uwe Kleine-König

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=20200109074445.73n3vapjl4vfjtsu@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=gustavo@embeddedor.com \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=peron.clem@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /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.