diff options
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r-- | drivers/dma/dmatest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 732fa1ec36ab..e190d8b30700 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -430,13 +430,15 @@ late_initcall(dmatest_init); | |||
430 | static void __exit dmatest_exit(void) | 430 | static void __exit dmatest_exit(void) |
431 | { | 431 | { |
432 | struct dmatest_chan *dtc, *_dtc; | 432 | struct dmatest_chan *dtc, *_dtc; |
433 | struct dma_chan *chan; | ||
433 | 434 | ||
434 | list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) { | 435 | list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) { |
435 | list_del(&dtc->node); | 436 | list_del(&dtc->node); |
437 | chan = dtc->chan; | ||
436 | dmatest_cleanup_channel(dtc); | 438 | dmatest_cleanup_channel(dtc); |
437 | pr_debug("dmatest: dropped channel %s\n", | 439 | pr_debug("dmatest: dropped channel %s\n", |
438 | dma_chan_name(dtc->chan)); | 440 | dma_chan_name(chan)); |
439 | dma_release_channel(dtc->chan); | 441 | dma_release_channel(chan); |
440 | } | 442 | } |
441 | } | 443 | } |
442 | module_exit(dmatest_exit); | 444 | module_exit(dmatest_exit); |