Skip to content

Commit 9cbc23f

Browse files
geertubroonie
authored andcommitted
regulator: bd9571mwv: Fix regulator name printed on registration failure
If a regulator fails to register, the driver prints an error message like: bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register bd9571mwv-regulator regulator However, the platform device's name is already printed as part of dev_err(), and does not allow the user to distinguish among the various regulators that are part of the PMIC. Fix this by printing regulator_desc.name instead, to change the message like: bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register DVFS regulator Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20210312130242.3390038-3-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3b6e708 commit 9cbc23f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/bd9571mwv-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
301301
&config);
302302
if (IS_ERR(rdev)) {
303303
dev_err(&pdev->dev, "failed to register %s regulator\n",
304-
pdev->name);
304+
regulators[i].name);
305305
return PTR_ERR(rdev);
306306
}
307307
}

0 commit comments

Comments
 (0)