aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 14dea1a87b7c..384868dedac3 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -147,8 +147,8 @@ EXPORT_SYMBOL(request_dma);
147 147
148int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data) 148int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data)
149{ 149{
150 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 150 BUG_ON(channel >= MAX_DMA_CHANNELS ||
151 && channel < MAX_DMA_CHANNELS)); 151 dma_ch[channel].chan_status == DMA_CHANNEL_FREE);
152 152
153 if (callback != NULL) { 153 if (callback != NULL) {
154 int ret; 154 int ret;
@@ -182,8 +182,8 @@ static void clear_dma_buffer(unsigned int channel)
182void free_dma(unsigned int channel) 182void free_dma(unsigned int channel)
183{ 183{
184 pr_debug("freedma() : BEGIN \n"); 184 pr_debug("freedma() : BEGIN \n");
185 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 185 BUG_ON(channel >= MAX_DMA_CHANNELS ||
186 && channel < MAX_DMA_CHANNELS)); 186 dma_ch[channel].chan_status == DMA_CHANNEL_FREE);
187 187
188 /* Halt the DMA */ 188 /* Halt the DMA */
189 disable_dma(channel); 189 disable_dma(channel);