DMA Engine development
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Huang Shijie <sjhuang@iluvatar.ai>
Cc: sudeep.dutt@intel.com, ashutosh.dixit@intel.com,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [v2] dma: mic_x100_dma: use devm_kzalloc to fix an issue
Date: Mon, 27 Aug 2018 11:16:53 +0530	[thread overview]
Message-ID: <20180827054652.GW2388@vkoul-mobl> (raw)

On 22-08-18, 10:40, Huang Shijie wrote:
> The following patch introduced an issue.
>     commit f6206f00d8c5 ("dmaengine: mic_x100_dma: use the new helper to simplify the code")
> 
> This issue is :
> 
> 	kfree(mic_dma_dev)
> 	.....
> 	dma_async_device_unregister(mic_dma_dev->device);
> 
> Free the memory, and use it again.
> 
> So use devm_kzalloc to allocate mic_dma_dev to fix it.
> 
> When the Devres try to release the resources, it will call release at the
> following order:
> 
> 	dma_async_device_unregister(mic_dma_dev->device);
> 	.....
> 	kfree(mic_dma_dev)

After fixing the subsystem name, applied thanks

             reply	other threads:[~2018-08-27  5:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27  5:46 Vinod Koul [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-08-22  2:40 [v2] dma: mic_x100_dma: use devm_kzalloc to fix an issue Huang Shijie

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=20180827054652.GW2388@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=ashutosh.dixit@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sjhuang@iluvatar.ai \
    --cc=sudeep.dutt@intel.com \
    /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