lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yd1JsCFiu5cqmS9N@pendragon.ideasonboard.com>
Date:   Tue, 11 Jan 2022 11:11:12 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Watson Chow <watson.chow@...et.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] regulator: max20086: fix error code in
 max20086_parse_regulators_dt()

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@...asonboard.com>

> Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ