All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: syscon: Correct check for syscon_node_to_regmap() errors
@ 2015-08-17 16:18 ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2015-08-17 16:18 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>
---
 drivers/leds/leds-syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
index d1660b039812..39fca4c9f1ee 100644
--- a/drivers/leds/leds-syscon.c
+++ b/drivers/leds/leds-syscon.c
@@ -83,7 +83,7 @@ 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;
 	}
-- 
1.8.2.2

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

end of thread, other threads:[~2015-08-18 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17 16:18 [PATCH] leds: syscon: Correct check for syscon_node_to_regmap() errors Bjorn Andersson
2015-08-17 16:18 ` Bjorn Andersson
2015-08-18 10:35 ` Jacek Anaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.