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:
Dan Carpenter 2022-01-11 10:26:58 +03:00 committed by Mark Brown
parent bfff546aae
commit 879cf80064
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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)