diff options
author | Bjorn Andersson <bjorn.andersson@sonymobile.com> | 2015-08-18 19:25:26 (GMT) |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2015-08-28 12:06:25 (GMT) |
commit | 991a3f61fa93c1752a47ae157a8238395850c730 (patch) | |
tree | 0c1bba3df895097c18563288e94a06612e913a18 /drivers/leds | |
parent | c2d4af9370b1757714b895f005479393e4ec14b8 (diff) | |
download | linux-991a3f61fa93c1752a47ae157a8238395850c730.tar.xz |
leds: syscon: Correct check for syscon_node_to_regmap() errors
syscon_node_to_regmap() returns a regmap or an ERR_PTR().
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-syscon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c index d1660b0..b88900d 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); |