syscon_node_to_regmap() returns a regmap or an ERR_PTR().

Signed-off-by: Bjorn Andersson <[email protected]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to