diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-22 14:34:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-22 14:34:09 -0400 |
commit | f20e3b5fe7ead0615309433260b9784d8da0bbbd (patch) | |
tree | eabb2e47a0355ac4e8024b7087b4e7cb9f324358 /drivers/dma/dmatest.c | |
parent | bcbfe664e7af019e698cef2feb85ac2b4f1ac11d (diff) | |
parent | f030d7b65e4e6399f23de2a41a58d1b607b6bd89 (diff) |
Merge branch 'for-rmk' of git://git.android.com/kernel into devel
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r-- | drivers/dma/dmatest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index a08d19704743..d1e381e35a9e 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -325,7 +325,12 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan) | |||
325 | struct dmatest_thread *thread; | 325 | struct dmatest_thread *thread; |
326 | unsigned int i; | 326 | unsigned int i; |
327 | 327 | ||
328 | dtc = kmalloc(sizeof(struct dmatest_chan), GFP_ATOMIC); | 328 | /* Have we already been told about this channel? */ |
329 | list_for_each_entry(dtc, &dmatest_channels, node) | ||
330 | if (dtc->chan == chan) | ||
331 | return DMA_DUP; | ||
332 | |||
333 | dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL); | ||
329 | if (!dtc) { | 334 | if (!dtc) { |
330 | pr_warning("dmatest: No memory for %s\n", chan->dev.bus_id); | 335 | pr_warning("dmatest: No memory for %s\n", chan->dev.bus_id); |
331 | return DMA_NAK; | 336 | return DMA_NAK; |