public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Watson Chow <watson.chow@avnet.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] regulator: max20086: fix error code in max20086_parse_regulators_dt()
Date: Tue, 11 Jan 2022 11:11:12 +0200	[thread overview]
Message-ID: <Yd1JsCFiu5cqmS9N@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220111072657.GK11243@kili>

Hi Dan,

Thank you for the patch.

On Tue, Jan 11, 2022 at 10:26:58AM +0300, Dan Carpenter wrote:
> This code accidentally returns PTR_ERR(NULL) which is success.  It
> should return a negative error code.

Oops, sorry.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/regulator/max20086-regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c
> index fbc56b043071..63aa6ec3254a 100644
> --- a/drivers/regulator/max20086-regulator.c
> +++ b/drivers/regulator/max20086-regulator.c
> @@ -140,7 +140,7 @@ static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
>  	node = of_get_child_by_name(chip->dev->of_node, "regulators");
>  	if (!node) {
>  		dev_err(chip->dev, "regulators node not found\n");
> -		return PTR_ERR(node);
> +		return -ENODEV;
>  	}
>  
>  	for (i = 0; i < chip->info->num_outputs; ++i)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-01-11  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  7:26 [PATCH] regulator: max20086: fix error code in max20086_parse_regulators_dt() Dan Carpenter
2022-01-11  9:11 ` Laurent Pinchart [this message]
2022-01-11 14:21 ` Mark Brown

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=Yd1JsCFiu5cqmS9N@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=watson.chow@avnet.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