[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43f5dfb3-ea3a-4f1d-b3bd-9e62f976b651@wanadoo.fr>
Date: Wed, 7 May 2025 19:17:25 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Shree Ramamoorthy <s-ramamoorthy@...com>
Cc: Aaro Koskinen <aaro.koskinen@....fi>,
Andreas Kemnade <andreas@...nade.info>, Kevin Hilman <khilman@...libre.com>,
Roger Quadros <rogerq@...nel.org>, Tony Lindgren <tony@...mide.com>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] regulator: tps65219: Fix erorr codes in probe()
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@...aro.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.
> }
Powered by blists - more mailing lists