Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

> Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux