mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
This commit is contained in:
parent
c2d4af9370
commit
991a3f61fa
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue