regulator: max20086: fix error code in max20086_parse_regulators_dt()
This code accidentally returns PTR_ERR(NULL) which is success. It
should return a negative error code.
Fixes: bfff546aae
("regulator: Add MAX20086-MAX20089 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20220111072657.GK11243@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
bfff546aae
commit
879cf80064
@ -140,7 +140,7 @@ static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
|
||||
node = of_get_child_by_name(chip->dev->of_node, "regulators");
|
||||
if (!node) {
|
||||
dev_err(chip->dev, "regulators node not found\n");
|
||||
return PTR_ERR(node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
for (i = 0; i < chip->info->num_outputs; ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user