[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210721165716.19915-1-macroalpha82@gmail.com>
Date: Wed, 21 Jul 2021 11:57:16 -0500
From: Chris Morgan <macroalpha82@...il.com>
To: linux-kernel@...r.kernel.org
Cc: broonie@...nel.org, lgirdwood@...il.com,
Chris Morgan <macromorgan@...mail.com>
Subject: [PATCH] regulator: fixed: use dev_err_probe for register
From: Chris Morgan <macromorgan@...mail.com>
Instead of returning error directly, use dev_err_probe. This avoids
messages in the dmesg log for devices which will be probed again later.
Signed-off-by: Chris Morgan <macromorgan@...mail.com>
---
drivers/regulator/fixed.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 39284610a536..599ad201dca7 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -287,8 +287,9 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->dev = devm_regulator_register(&pdev->dev, &drvdata->desc,
&cfg);
if (IS_ERR(drvdata->dev)) {
- ret = PTR_ERR(drvdata->dev);
- dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
+ ret = dev_err_probe(&pdev->dev, PTR_ERR(drvdata->dev),
+ "Failed to register regulator: %ld\n",
+ PTR_ERR(drvdata->dev));
return ret;
}
--
2.25.1
Powered by blists - more mailing lists