From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
vireshk@kernel.org, dan.j.williams@intel.com,
vinod.koul@intel.com
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable
Date: Mon, 22 May 2017 21:20:52 +0300 [thread overview]
Message-ID: <1495477252.6967.64.camel@linux.intel.com> (raw)
In-Reply-To: <1495449108-31532-1-git-send-email-arvind.yadav.cs@gmail.com>
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@linux.intel.com>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.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@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-05-22 18:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 10:31 Arvind Yadav
2017-05-22 10:40 ` Viresh Kumar
2017-05-22 18:20 ` Andy Shevchenko [this message]
2017-05-24 4:26 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495477252.6967.64.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome