public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors
Date: Mon, 24 Aug 2015 10:20:27 +0200	[thread overview]
Message-ID: <55DAD3CB.5060705@samsung.com> (raw)
In-Reply-To: <1439925926-3174-1-git-send-email-bjorn.andersson@sonymobile.com>

On 08/18/2015 09:25 PM, Bjorn Andersson wrote:
> syscon_node_to_regmap() returns a regmap or an ERR_PTR().
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
>
> Changes since v1:
> - Propagate the error
>
>   drivers/leds/leds-syscon.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
> index d1660b039812..b88900d721e4 100644
> --- a/drivers/leds/leds-syscon.c
> +++ b/drivers/leds/leds-syscon.c
> @@ -83,9 +83,9 @@ static int syscon_led_probe(struct platform_device *pdev)
>   		return -ENODEV;
>   	}
>   	map = syscon_node_to_regmap(parent->of_node);
> -	if (!map) {
> +	if (IS_ERR(map)) {
>   		dev_err(dev, "no regmap for syscon LED parent\n");
> -		return -ENODEV;
> +		return PTR_ERR(map);
>   	}
>
>   	sled = devm_kzalloc(dev, sizeof(*sled), GFP_KERNEL);
>

Merged, thanks.

-- 
Best Regards,
Jacek Anaszewski

  reply	other threads:[~2015-08-24  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18 19:25 [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors Bjorn Andersson
2015-08-24  8:20 ` Jacek Anaszewski [this message]
2015-09-08  8:43 ` 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=55DAD3CB.5060705@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=cooloney@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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