* [PATCH next] regulator: tps65219: Fix erorr codes in probe()
@ 2025-05-07 12:59 Dan Carpenter
2025-05-07 17:17 ` Christophe JAILLET
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2025-05-07 12:59 UTC (permalink / raw)
To: Shree Ramamoorthy
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, linux-omap,
linux-kernel, kernel-janitors
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] regulator: tps65219: Fix erorr codes in probe()
2025-05-07 12:59 [PATCH next] regulator: tps65219: Fix erorr codes in probe() Dan Carpenter
@ 2025-05-07 17:17 ` Christophe JAILLET
2025-05-07 17:20 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2025-05-07 17:17 UTC (permalink / raw)
To: Dan Carpenter, Shree Ramamoorthy
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, linux-omap,
linux-kernel, kernel-janitors
Le 07/05/2025 à 14:59, Dan Carpenter a écrit :
> 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(-)
Hi,
>
> 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);
and error can also be removed in the message as well, with the
corresponding %d.
> }
> @@ -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);
Same.
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] regulator: tps65219: Fix erorr codes in probe()
2025-05-07 17:17 ` Christophe JAILLET
@ 2025-05-07 17:20 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-05-07 17:20 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Shree Ramamoorthy, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Liam Girdwood, Mark Brown,
linux-omap, linux-kernel, kernel-janitors
On Wed, May 07, 2025 at 07:17:25PM +0200, Christophe JAILLET wrote:
> Le 07/05/2025 à 14:59, Dan Carpenter a écrit :
> > 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(-)
>
> Hi,
>
> >
> > 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);
>
> and error can also be removed in the message as well, with the corresponding
> %d.
>
Good point. Also I spelled "error" wrong in the subject.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-07 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 12:59 [PATCH next] regulator: tps65219: Fix erorr codes in probe() Dan Carpenter
2025-05-07 17:17 ` Christophe JAILLET
2025-05-07 17:20 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox