lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] dmaengine: at_xdmac: Handle return value of clk_prepare_enable.
On Mon, Aug 07, 2017 at 01:15:19PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>

Thanks
> ---
> drivers/dma/at_xdmac.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index 6a3cf97..c00e392 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1883,8 +1883,11 @@ static int atmel_xdmac_resume(struct device *dev)
> struct at_xdmac_chan *atchan;
> struct dma_chan *chan, *_chan;
> int i;
> + int ret;
>
> - clk_prepare_enable(atxdmac->clk);
> + ret = clk_prepare_enable(atxdmac->clk);
> + if (ret)
> + return ret;
>
> /* Clear pending interrupts. */
> for (i = 0; i < atxdmac->dma.chancnt; i++) {
> --
> 1.9.1
>

\
 
 \ /
  Last update: 2017-08-16 08:21    [W:2.188 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site