Skip to content

Commit 879cf80

Browse files
Dan Carpenterbroonie
authored andcommitted
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: bfff546 ("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>
1 parent bfff546 commit 879cf80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/max20086-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
140140
node = of_get_child_by_name(chip->dev->of_node, "regulators");
141141
if (!node) {
142142
dev_err(chip->dev, "regulators node not found\n");
143-
return PTR_ERR(node);
143+
return -ENODEV;
144144
}
145145

146146
for (i = 0; i < chip->info->num_outputs; ++i)

0 commit comments

Comments
 (0)