Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646728
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable |
| Date | 2017-05-22 12:50 +0200 |
| Message-ID | <tJT4u-4AD-27@gated-at.bofh.it> (permalink) |
| References | <tJSUO-4wq-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Create the patch using this command and the unnecessary "v1" in the
subject will go away:
$ git format-patch -C -M --thread=shallow
On 22-05-17, 16:01, 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>
> ---
> 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);
> }
You don't need to resend it for now.
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-05-22 12:40 +0200 Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-22 12:50 +0200 Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-22 20:30 +0200 Re: [PATCH v1] dmaengine: DW DMAC: Handle return value of clk_prepare_enable Vinod Koul <vinod.koul@intel.com> - 2017-05-24 06:30 +0200
csiph-web