public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: daniel.thompson@linaro•org (Daniel Thompson)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 2/4] dmaengine: Add STM32 DMA driver
Date: Wed, 14 Oct 2015 09:52:58 +0100	[thread overview]
Message-ID: <561E17EA.6000900@linaro.org> (raw)
In-Reply-To: <CAOAejn1N=dFZ3nQ_hNznJQX1-fkP3r=vdYuWY4OMH65PrW3xVg@mail.gmail.com>

On 14/10/15 08:54, M'boumba Cedric Madianga wrote:
>>> +static int stm32_dma_alloc_chan_resources(struct dma_chan *c)
>>> +{
>>> +       struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
>>> +       struct stm32_dma_device *dmadev = stm32_dma_chan_get_dev(chan);
>>> +       int ret;
>>> +
>>> +       chan->config_init = false;
>>> +       ret = clk_prepare_enable(dmadev->clk);
>>> +       if (ret < 0) {
>>> +               dev_err(chan2dev(chan), "clk_prepare_enable failed: %d\n",
>>> ret);
>>> +               return ret;
>>> +       }
>>> +
>>> +       ret = stm32_dma_disable_chan(chan);
>>> +
>>> +       return ret;
>>> +}
>>
>>
>> The error path here looks like it will leak clock references.
>
> Sorry I didn't catch it. What does it mean ?

If stm32_dma_disable_chan() returns an error then we will not restore 
the original the clock counts causing them to "leak".


Daniel.

  reply	other threads:[~2015-10-14  8:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 14:05 [PATCH v2 0/4] Add support for STM32 DMA M'boumba Cedric Madianga
2015-10-13 14:05 ` [PATCH v2 1/4] dt-bindings: Document the STM32 DMA bindings M'boumba Cedric Madianga
2015-10-14  8:54   ` M'boumba Cedric Madianga
2015-10-13 14:05 ` [PATCH v2 2/4] dmaengine: Add STM32 DMA driver M'boumba Cedric Madianga
2015-10-13 14:34   ` Daniel Thompson
2015-10-14  7:54     ` M'boumba Cedric Madianga
2015-10-14  8:52       ` Daniel Thompson [this message]
2015-10-14  8:57         ` M'boumba Cedric Madianga
2015-10-14 13:17       ` M'boumba Cedric Madianga
2015-10-14 13:29         ` Daniel Thompson
2015-10-14 13:41           ` M'boumba Cedric Madianga
2015-10-14 14:24             ` Daniel Thompson
2015-10-14 15:26               ` M'boumba Cedric Madianga
2015-10-14 15:28                 ` Daniel Thompson
2015-10-14 15:41                   ` M'boumba Cedric Madianga
2015-10-15  4:07                     ` Vinod Koul
2015-10-14 11:16   ` Vinod Koul
2015-10-14 13:07     ` M'boumba Cedric Madianga
2015-10-14 14:14       ` Vinod Koul
2015-10-13 14:05 ` [PATCH v2 3/4] ARM: dts: Add STM32 DMA support for STM32F429 MCU M'boumba Cedric Madianga
2015-10-13 14:05 ` [PATCH v2 4/4] ARM: configs: Add STM32 DMA support in STM32 defconfig M'boumba Cedric Madianga

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=561E17EA.6000900@linaro.org \
    --to=daniel.thompson@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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