Skip to content

Commit

Permalink
regulator: tps65219: Report regulator name if devm_regulator_register…
Browse files Browse the repository at this point in the history
… fails

Make the error message more useful by reporting the actual regulator
name if devm_regulator_register() fails.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Link: https://lore.kernel.org/r/20221214153409.1270213-1-w.egorov@phytec.de
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
wdmegrv authored and broonie committed Dec 25, 2022
1 parent 413ec72 commit cfbe9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps65219-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
&config);
if (IS_ERR(rdev)) {
dev_err(tps->dev, "failed to register %s regulator\n",
pdev->name);
regulators[i].name);
return PTR_ERR(rdev);
}
rdevtbl[i] = rdev;
Expand Down

0 comments on commit cfbe9df

Please sign in to comment.