From: Wadim Egorov Date: Wed, 14 Dec 2022 15:34:09 +0000 (+0100) Subject: regulator: tps65219: Report regulator name if devm_regulator_register fails X-Git-Tag: v6.6.17~5384^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfbe9dfd664c7717ef297e01b7eecccc2b5fde6f;p=platform%2Fkernel%2Flinux-rpi.git regulator: tps65219: Report regulator name if devm_regulator_register fails Make the error message more useful by reporting the actual regulator name if devm_regulator_register() fails. Signed-off-by: Wadim Egorov Link: https://lore.kernel.org/r/20221214153409.1270213-1-w.egorov@phytec.de Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index c484c94..f294d3b 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -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;