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: <0da24e5e-cf85-7994-4429-15ecc9a7cdf7@huawei.com>
Date:   Tue, 3 Nov 2020 16:18:52 +0800
From:   Qinglang Miao <miaoqinglang@...wei.com>
To:     Mark Brown <broonie@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        <bcm-kernel-feedback-list@...adcom.com>
CC:     <linux-spi@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] spi: bcm63xx-hsspi: fix missing
 clk_disable_unprepare() on error in bcm63xx_hsspi_resume



在 2020/11/3 15:49, Qinglang Miao 写道:
> Fix the missing clk_disable_unprepare() before return
> from bcm63xx_hsspi_resume in the error handling case when
> fails to prepare and enable bs->pll_clk.
> 
> Fixes: 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled")
> Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
> ---
>   drivers/spi/spi-bcm63xx-hsspi.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
> index 9909b18f3..1f08d7553 100644
> --- a/drivers/spi/spi-bcm63xx-hsspi.c
> +++ b/drivers/spi/spi-bcm63xx-hsspi.c
> @@ -494,8 +494,10 @@ static int bcm63xx_hsspi_resume(struct device *dev)
>   
>   	if (bs->pll_clk) {
>   		ret = clk_prepare_enable(bs->pll_clk);
> -		if (ret)
> +		if (ret) {
> +			clk_disable_unprepare(bs->clk);
>   			return ret;
> +		}
>   	}
>   
>   	spi_master_resume(master);
> 
Hi Mark and Florian,

I made a careless mistake for adding v2 as subject-prefix, this patch is 
the base version actually.

Sorry about that.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ