Linux Tegra architecture development
 help / color / mirror / Atom feed
* [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe()
@ 2014-07-31 15:23 Dan Carpenter
  2014-07-31 15:36 ` Thierry Reding
  2014-08-11  6:57 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-07-31 15:23 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Linus Walleij, Thierry Reding, Grant Likely, Rob Herring,
	linux-tegra, kernel-janitors

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;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe()
  2014-07-31 15:23 [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe() Dan Carpenter
@ 2014-07-31 15:36 ` Thierry Reding
  2014-08-11  6:57 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2014-07-31 15:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Stephen Warren, Linus Walleij, Grant Likely, Rob Herring,
	linux-tegra, kernel-janitors

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe()
  2014-07-31 15:23 [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe() Dan Carpenter
  2014-07-31 15:36 ` Thierry Reding
@ 2014-08-11  6:57 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2014-08-11  6:57 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Stephen Warren, Thierry Reding, Grant Likely, Rob Herring,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

On Thu, Jul 31, 2014 at 5:23 PM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 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-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Patch applied with Stephen's and Thierry's ACKs.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-11  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 15:23 [patch 2/2] pinctrl: tegra-xusb: testing wrong variable in probe() Dan Carpenter
2014-07-31 15:36 ` Thierry Reding
2014-08-11  6:57 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox