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: <1495477252.6967.64.camel@linux.intel.com>
Date:   Mon, 22 May 2017 21:20:52 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>, vireshk@...nel.org,
        dan.j.williams@...el.com, vinod.koul@...el.com
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of
 clk_prepare_enable

On Mon, 2017-05-22 at 16:01 +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 

Acked-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
>  drivers/dma/dw/platform.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
> index c639c60..bc31fe8 100644
> --- a/drivers/dma/dw/platform.c
> +++ b/drivers/dma/dw/platform.c
> @@ -306,8 +306,12 @@ static int dw_resume_early(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
>  	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
> +	int ret;
> +
> +	ret = clk_prepare_enable(chip->clk);
> +	if (ret)
> +		return ret;
>  
> -	clk_prepare_enable(chip->clk);
>  	return dw_dma_enable(chip);
>  }
>  

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ