lkml.org 
[lkml]   [2018]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] dma: mic_x100_dma: use devm_kzalloc to fix an issue
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
--
~Vinod

\
 
 \ /
  Last update: 2018-08-27 07:47    [W:0.037 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site