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: <0c4c572d-0fec-05cd-e738-4206290b40f2@microchip.com>
Date:   Sat, 11 Jun 2022 07:11:17 +0000
From:   <Conor.Dooley@...rochip.com>
To:     <wupeng58@...wei.com>, <broonie@...nel.org>
CC:     <linux-riscv@...ts.infradead.org>, <linux-spi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <Lewis.Hanly@...rochip.com>,
        <liwei391@...wei.com>
Subject: Re: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on
 error in mchp_corespi_probe()

On 11/06/2022 03:11, Peng Wu wrote:
> spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()

       ^ s/micro/microchip-core ?

> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Fix the unreasonable clk_prepare_enable() with clk_disable_unprepare()
> before return from mchp_corespi_probe() in the error handling case.
> 
> Signed-off-by: Peng Wu <wupeng58@...wei.com>

"unreasonable", very diplomatic way of putting it!

Good spot, thanks.
Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>

> ---
>  drivers/spi/spi-microchip-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index 5b2aee30fa04..bf6847d95fe3 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -580,7 +580,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
> 
>  error_release_hardware:
>         mchp_corespi_disable(spi);
> -       clk_prepare_enable(spi->clk);
> +       clk_disable_unprepare(spi->clk);
>  error_release_master:
>         spi_master_put(master);
> 
> --
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ