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: <20201205162525.5k35z3b4brdnfjxh@mobilestation>
Date:   Sat, 5 Dec 2020 19:25:25 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Zhang Changzhong <zhangchangzhong@...wei.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Ramil Zaripov <Ramil.Zaripov@...kalelectronics.ru>,
        linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe()

Hello Zhang

On Fri, Dec 04, 2020 at 04:42:37PM +0800, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>

Thanks for the patch. Definitely

Acked-by: Serge Semin <fancer.lancer@...il.com>

-Sergey

> ---
>  drivers/spi/spi-dw-bt1.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c
> index f382dfad..c279b78 100644
> --- a/drivers/spi/spi-dw-bt1.c
> +++ b/drivers/spi/spi-dw-bt1.c
> @@ -280,8 +280,10 @@ static int dw_spi_bt1_probe(struct platform_device *pdev)
>  	dws->bus_num = pdev->id;
>  	dws->reg_io_width = 4;
>  	dws->max_freq = clk_get_rate(dwsbt1->clk);
> -	if (!dws->max_freq)
> +	if (!dws->max_freq) {
> +		ret = -EINVAL;
>  		goto err_disable_clk;
> +	}
>  
>  	init_func = device_get_match_data(&pdev->dev);
>  	ret = init_func(pdev, dwsbt1);
> -- 
> 2.9.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ