[PATCH v1 1/4] regulator: tps65219: Use dev_err_probe() instead of dev_err()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 drivers/regulator/tps65219-regulator.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index b4065356392f..14d843a99d0f 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -322,11 +322,11 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
 		dev_dbg(tps->dev, "%s regul i= %d START", __func__, i);
 		rdev = devm_regulator_register(&pdev->dev, &regulators[i],
 					       &config);
-		if (IS_ERR(rdev)) {
-			dev_err(tps->dev, "failed to register %s regulator\n",
-				regulators[i].name);
-			return PTR_ERR(rdev);
-		}
+		if (IS_ERR(rdev))
+			return dev_err_probe(tps->dev, PTR_ERR(rdev),
+					"Failed to register %s regulator\n",
+					regulators[i].name);
+
 		rdevtbl[i] = rdev;
 		dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i);
 	}
-- 
2.34.1





[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux