public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
Date: Wed, 11 Jun 2014 10:36:17 +0200	[thread overview]
Message-ID: <53981501.9090404@gmail.com> (raw)
In-Reply-To: <20140611081513.GA29572@mwanda>

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)
>


  reply	other threads:[~2014-06-11  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-07-04 23:16 ` 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=53981501.9090404@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=antoine.tenart@free-electrons.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox