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: <20190130180526.4DE9.4A936039@socionext.com>
Date:   Wed, 30 Jan 2019 18:05:27 +0900
From:   Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
To:     Axel Lin <axel.lin@...ics.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: uniphier: Fix probe error handling

Hi Axel,

On Wed, 30 Jan 2019 15:11:09 +0800 <axel.lin@...ics.com> wrote:

> Ensure unwind all resources if probe fails.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>  drivers/regulator/uniphier-regulator.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/uniphier-regulator.c b/drivers/regulator/uniphier-regulator.c
> index abf22acbd13e..6ba0ae405f2b 100644
> --- a/drivers/regulator/uniphier-regulator.c
> +++ b/drivers/regulator/uniphier-regulator.c
> @@ -87,8 +87,10 @@ static int uniphier_regulator_probe(struct platform_device *pdev)
>  	}
>  
>  	regmap = devm_regmap_init_mmio(dev, base, priv->data->regconf);
> -	if (IS_ERR(regmap))
> -		return PTR_ERR(regmap);
> +	if (IS_ERR(regmap)) {
> +		ret = PTR_ERR(regmap);
> +		goto out_rst_assert;
> +	}

Surely this return without asserting resets is wrong. This looks good to me.

Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>

Thank you,

---
Best Regards,
Kunihiko Hayashi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ