lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dmaengine: Fix oops on dmatest module unload.
Date
This patch fixes an oops that happens when the dmatest module is unloaded. The
dma_release_channel() function is called on channels that have already been
cleaned up (and therefore freed) with dmatest_cleanup_channel().

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

---
drivers/dma/dmatest.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 732fa1e..d12219c 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -433,10 +433,10 @@ static void __exit dmatest_exit(void)

list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) {
list_del(&dtc->node);
+ dma_release_channel(dtc->chan);
dmatest_cleanup_channel(dtc);
pr_debug("dmatest: dropped channel %s\n",
dma_chan_name(dtc->chan));
- dma_release_channel(dtc->chan);
}
}
module_exit(dmatest_exit);
--
tg: (8e49215..) adx/dma (depends on: adx/master)

\
 
 \ /
  Last update: 2009-02-10 10:33    [W:0.256 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site