Skip to content

Commit e7ce043

Browse files
shramamoorthybroonie
authored andcommitted
regulator: tps65219: Use dev_err_probe() instead of dev_err()
Make the error message format unified by switching from dev_err() to dev_err_probe() where there is a chance of -EPROBE_DEFER returned. This helps simplify the error code where possible. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://patch.msgid.link/20241217204526.1010989-2-s-ramamoorthy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0824271 commit e7ce043

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/regulator/tps65219-regulator.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,11 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
322322
dev_dbg(tps->dev, "%s regul i= %d START", __func__, i);
323323
rdev = devm_regulator_register(&pdev->dev, &regulators[i],
324324
&config);
325-
if (IS_ERR(rdev)) {
326-
dev_err(tps->dev, "failed to register %s regulator\n",
327-
regulators[i].name);
328-
return PTR_ERR(rdev);
329-
}
325+
if (IS_ERR(rdev))
326+
return dev_err_probe(tps->dev, PTR_ERR(rdev),
327+
"Failed to register %s regulator\n",
328+
regulators[i].name);
329+
330330
rdevtbl[i] = rdev;
331331
dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i);
332332
}

0 commit comments

Comments
 (0)