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] [day] [month] [year] [list]
Message-ID: <50540bda-ffaa-1141-b077-197ac64fcdd1@conchuod.ie>
Date:   Sat, 11 Jun 2022 10:20:14 +0100
From:   Conor Dooley <mail@...chuod.ie>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Conor Dooley <conor.dooley@...rochip.com>,
        Mark Brown <broonie@...nel.org>,
        Daire McNamara <daire.mcnamara@...rochip.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Lewis Hanly <lewis.hanly@...rochip.com>,
        linux-riscv@...ts.infradead.org, linux-spi@...r.kernel.org
Subject: Re: [PATCH] spi: microchip-core: Fix the error handling path in
 mchp_corespi_probe()



On 11/06/2022 08:37, Christophe JAILLET wrote:
> clk_prepare_enable() is called instead of clk_disable_unprepare() in the
> error handling path of the probe function.
> 
> Change the function that is called so that resources are released
> correctly.
> 
> Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Hey Christophe,
Peng Wu already sent a patch for this, but thanks for trying
to clean up after me anyway.
Thanks,
Conor.

> ---
>  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);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ