linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors
@ 2015-08-18 19:25 Bjorn Andersson
  2015-08-24  8:20 ` Jacek Anaszewski
  2015-09-08  8:43 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2015-08-18 19:25 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Jacek Anaszewski
  Cc: Linus Walleij, linux-leds, linux-kernel

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


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

* Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors
  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
  2015-09-08  8:43 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Jacek Anaszewski @ 2015-08-24  8:20 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Bryan Wu, Richard Purdie, Linus Walleij, linux-leds, linux-kernel

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

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

* Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors
  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
@ 2015-09-08  8:43 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2015-09-08  8:43 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Bryan Wu, Richard Purdie, Jacek Anaszewski, linux-leds, linux-kernel

On Tue, Aug 18, 2015 at 9:25 PM, Bjorn Andersson
<bjorn.andersson@sonymobile.com> 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

Too late but:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2015-09-08  8:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-09-08  8:43 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).