public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
@ 2014-06-11  8:15 Dan Carpenter
  2014-06-11  8:36 ` Sebastian Hesselbarth
  2014-07-04 23:16 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-06-11  8:15 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Sebastian Hesselbarth, Antoine Tenart, linux-kernel,
	kernel-janitors

We are returning success here because PTR_ERR(NULL) is zero.  We should
be returning -ENODEV.

Fixes: 3de68d331c24 ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index edf5d2f..86db223 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
 
 	regmap = dev_get_regmap(&pdev->dev, NULL);
 	if (!regmap)
-		return PTR_ERR(regmap);
+		return -ENODEV;
 
 	pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
 	if (!pctrl)

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

* Re: [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
  2014-06-11  8:15 [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe() Dan Carpenter
@ 2014-06-11  8:36 ` Sebastian Hesselbarth
  2014-07-04 23:16 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-11  8:36 UTC (permalink / raw)
  To: Dan Carpenter, Linus Walleij
  Cc: Antoine Tenart, linux-kernel, kernel-janitors

On 06/11/2014 10:15 AM, Dan Carpenter wrote:
> We are returning success here because PTR_ERR(NULL) is zero.  We should
> be returning -ENODEV.
>
> Fixes: 3de68d331c24 ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Dan, thanks for the fix!

Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

> diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
> index edf5d2f..86db223 100644
> --- a/drivers/pinctrl/berlin/berlin.c
> +++ b/drivers/pinctrl/berlin/berlin.c
> @@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
>
>   	regmap = dev_get_regmap(&pdev->dev, NULL);
>   	if (!regmap)
> -		return PTR_ERR(regmap);
> +		return -ENODEV;
>
>   	pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
>   	if (!pctrl)
>


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

* Re: [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
  2014-06-11  8:15 [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe() Dan Carpenter
  2014-06-11  8:36 ` Sebastian Hesselbarth
@ 2014-07-04 23:16 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2014-07-04 23:16 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sebastian Hesselbarth, Antoine Tenart,
	linux-kernel@vger.kernel.org, kernel-janitors

On Wed, Jun 11, 2014 at 10:15 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:

> We are returning success here because PTR_ERR(NULL) is zero.  We should
> be returning -ENODEV.
>
> Fixes: 3de68d331c24 ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied for fixes!

Yours,
Linus Walleij

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

end of thread, other threads:[~2014-07-04 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11  8:15 [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe() Dan Carpenter
2014-06-11  8:36 ` Sebastian Hesselbarth
2014-07-04 23:16 ` Linus Walleij

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