All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-tegra@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe()
Date: Thu, 31 Jul 2014 15:36:53 +0000	[thread overview]
Message-ID: <20140731153651.GB21098@ulmo.nvidia.com> (raw)
In-Reply-To: <20140731152308.GE31539@mwanda>

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

On Thu, Jul 31, 2014 at 06:23:08PM +0300, Dan Carpenter wrote:
> There is a cut and paste bug so we test the wrong variable.  "err" is
> never less than zero at this point.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c
> index 419a047..e641b42 100644
> --- a/drivers/pinctrl/pinctrl-tegra-xusb.c
> +++ b/drivers/pinctrl/pinctrl-tegra-xusb.c
> @@ -930,7 +930,8 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
>  
>  	padctl->provider = devm_of_phy_provider_register(&pdev->dev,
>  							 tegra_xusb_padctl_xlate);
> -	if (err < 0) {
> +	if (IS_ERR(padctl->provider)) {
> +		err = PTR_ERR(padctl->provider);
>  		dev_err(&pdev->dev, "failed to register PHYs: %d\n", err);
>  		goto unregister;
>  	}

And another good catch. Thanks Dan.

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-tegra@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe()
Date: Thu, 31 Jul 2014 17:36:53 +0200	[thread overview]
Message-ID: <20140731153651.GB21098@ulmo.nvidia.com> (raw)
In-Reply-To: <20140731152308.GE31539@mwanda>

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

On Thu, Jul 31, 2014 at 06:23:08PM +0300, Dan Carpenter wrote:
> There is a cut and paste bug so we test the wrong variable.  "err" is
> never less than zero at this point.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c
> index 419a047..e641b42 100644
> --- a/drivers/pinctrl/pinctrl-tegra-xusb.c
> +++ b/drivers/pinctrl/pinctrl-tegra-xusb.c
> @@ -930,7 +930,8 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
>  
>  	padctl->provider = devm_of_phy_provider_register(&pdev->dev,
>  							 tegra_xusb_padctl_xlate);
> -	if (err < 0) {
> +	if (IS_ERR(padctl->provider)) {
> +		err = PTR_ERR(padctl->provider);
>  		dev_err(&pdev->dev, "failed to register PHYs: %d\n", err);
>  		goto unregister;
>  	}

And another good catch. Thanks Dan.

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-07-31 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 15:23 [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe() Dan Carpenter
2014-07-31 15:23 ` Dan Carpenter
2014-07-31 15:36 ` Thierry Reding [this message]
2014-07-31 15:36   ` Thierry Reding
2014-08-11  6:57 ` Linus Walleij
2014-08-11  6:57   ` Linus Walleij

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=20140731153651.GB21098@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=grant.likely@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=swarren@wwwdotorg.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.