public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Shree Ramamoorthy <s-ramamoorthy@ti.com>,
	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: Re: [PATCH next] regulator: tps65219: Fix erorr codes in probe()
Date: Wed, 7 May 2025 20:20:44 +0300	[thread overview]
Message-ID: <aBuWbImT1jgm2QTt@stanley.mountain> (raw)
In-Reply-To: <43f5dfb3-ea3a-4f1d-b3bd-9e62f976b651@wanadoo.fr>

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


      reply	other threads:[~2025-05-07 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=aBuWbImT1jgm2QTt@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=andreas@kemnade.info \
    --cc=broonie@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --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