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]
Date:   Sat, 18 Feb 2017 16:23:35 +0100
From:   Marek Vasut <marek.vasut@...il.com>
To:     Alexey Khoroshilov <khoroshilov@...ras.ru>,
        Cyrille Pitchen <cyrille.pitchen@...el.com>
Cc:     David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Richard Weinberger <richard@....at>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        ldv-project@...uxtesting.org
Subject: Re: [PATCH] mtd: spi-nor: hisi: do not ignore clk_prepare_enable()
 failure

On 02/17/2017 11:08 PM, Alexey Khoroshilov wrote:
> hisi_spi_nor_probe() ignores clk_prepare_enable() error code.
> The patch fixes that.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>

Acked-by: Marek Vasut <marek.vasut@...il.com>

> ---
>  drivers/mtd/spi-nor/hisi-sfc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/hisi-sfc.c b/drivers/mtd/spi-nor/hisi-sfc.c
> index 20378b0d55e9..a286350627a6 100644
> --- a/drivers/mtd/spi-nor/hisi-sfc.c
> +++ b/drivers/mtd/spi-nor/hisi-sfc.c
> @@ -448,8 +448,11 @@ static int hisi_spi_nor_probe(struct platform_device *pdev)
>  	if (!host->buffer)
>  		return -ENOMEM;
>  
> +	ret = clk_prepare_enable(host->clk);
> +	if (ret)
> +		return ret;
> +
>  	mutex_init(&host->lock);
> -	clk_prepare_enable(host->clk);
>  	hisi_spi_nor_init(host);
>  	ret = hisi_spi_nor_register_all(host);
>  	if (ret)
> 


-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ