* [PATCH] regulator: pca9450: Fix error code in probe()
@ 2025-11-21 13:35 Dan Carpenter
2025-11-21 16:57 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-11-21 13:35 UTC (permalink / raw)
To: Frieder Schrempf; +Cc: Liam Girdwood, Mark Brown, linux-kernel, kernel-janitors
Return "PTR_ERR(pca9450->sd_vsel_gpio)" instead of "ret". The "ret"
variable is success at this point.
Fixes: 3ce6f4f943dd ("regulator: pca9450: Fix control register for LDO5")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/regulator/pca9450-regulator.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 93154c9c98dd..32780c311ccd 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -1401,10 +1401,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
* to this signal (if SION bit is set in IOMUX).
*/
pca9450->sd_vsel_gpio = gpiod_get_optional(&ldo5->dev, "sd-vsel", GPIOD_IN);
- if (IS_ERR(pca9450->sd_vsel_gpio)) {
- dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
- return ret;
- }
+ if (IS_ERR(pca9450->sd_vsel_gpio))
+ return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->sd_vsel_gpio),
+ "Failed to get SD_VSEL GPIO\n");
pca9450->sd_vsel_fixed_low =
of_property_read_bool(ldo5->dev.of_node, "nxp,sd-vsel-fixed-low");
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: pca9450: Fix error code in probe()
2025-11-21 13:35 [PATCH] regulator: pca9450: Fix error code in probe() Dan Carpenter
@ 2025-11-21 16:57 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-11-21 16:57 UTC (permalink / raw)
To: Frieder Schrempf, Dan Carpenter
Cc: Liam Girdwood, linux-kernel, kernel-janitors
On Fri, 21 Nov 2025 16:35:24 +0300, Dan Carpenter wrote:
> Return "PTR_ERR(pca9450->sd_vsel_gpio)" instead of "ret". The "ret"
> variable is success at this point.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: pca9450: Fix error code in probe()
commit: 670500b41e543c5cb09eb9f7f0e4e26c5b5fdf7e
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-21 16:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 13:35 [PATCH] regulator: pca9450: Fix error code in probe() Dan Carpenter
2025-11-21 16:57 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).