From: Dan Carpenter <dan.carpenter@linaro.org>
To: Shree Ramamoorthy <s-ramamoorthy@ti.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] regulator: tps65219: Fix erorr codes in probe()
Date: Wed, 7 May 2025 15:59:08 +0300 [thread overview]
Message-ID: <aBtZHEkgYGK33fWk@stanley.mountain> (raw)
There is a copy and paste error and we accidentally use "PTR_ERR(rdev)"
instead of "error". The "rdev" pointer is valid at this point so the
existing code returns a positive value instead of instead of a negative
error code.
Fixes: 38c9f98db20a ("regulator: tps65219: Add support for TPS65215 Regulator IRQs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/regulator/tps65219-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index b16b300d7f45..f5cd8e33e518 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -454,7 +454,7 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
irq_type->irq_name,
&irq_data[i]);
if (error)
- return dev_err_probe(tps->dev, PTR_ERR(rdev),
+ return dev_err_probe(tps->dev, error,
"Failed to request %s IRQ %d: %d\n",
irq_type->irq_name, irq, error);
}
@@ -477,7 +477,7 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
irq_type->irq_name,
&irq_data[i]);
if (error)
- return dev_err_probe(tps->dev, PTR_ERR(rdev),
+ return dev_err_probe(tps->dev, error,
"Failed to request %s IRQ %d: %d\n",
irq_type->irq_name, irq, error);
}
--
2.47.2
next reply other threads:[~2025-05-07 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 12:59 Dan Carpenter [this message]
2025-05-07 17:17 ` [PATCH next] regulator: tps65219: Fix erorr codes in probe() Christophe JAILLET
2025-05-07 17:20 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBtZHEkgYGK33fWk@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rogerq@kernel.org \
--cc=s-ramamoorthy@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox