diff options
| -rw-r--r-- | drivers/rapidio/devices/tsi721_dma.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/rapidio/devices/tsi721_dma.c b/drivers/rapidio/devices/tsi721_dma.c index 14fc36ac3d85..006ea5a45020 100644 --- a/drivers/rapidio/devices/tsi721_dma.c +++ b/drivers/rapidio/devices/tsi721_dma.c | |||
| @@ -222,7 +222,7 @@ static int tsi721_bdma_ch_free(struct tsi721_bdma_chan *bdma_chan) | |||
| 222 | struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); | 222 | struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); |
| 223 | #endif | 223 | #endif |
| 224 | 224 | ||
| 225 | if (bdma_chan->bd_base == NULL) | 225 | if (!bdma_chan->bd_base) |
| 226 | return 0; | 226 | return 0; |
| 227 | 227 | ||
| 228 | /* Check if DMA channel still running */ | 228 | /* Check if DMA channel still running */ |
| @@ -346,7 +346,7 @@ tsi721_desc_fill_init(struct tsi721_tx_desc *desc, | |||
| 346 | { | 346 | { |
| 347 | u64 rio_addr; | 347 | u64 rio_addr; |
| 348 | 348 | ||
| 349 | if (bd_ptr == NULL) | 349 | if (!bd_ptr) |
| 350 | return -EINVAL; | 350 | return -EINVAL; |
| 351 | 351 | ||
| 352 | /* Initialize DMA descriptor */ | 352 | /* Initialize DMA descriptor */ |
| @@ -370,7 +370,7 @@ tsi721_desc_fill_init(struct tsi721_tx_desc *desc, | |||
| 370 | static int | 370 | static int |
| 371 | tsi721_desc_fill_end(struct tsi721_dma_desc *bd_ptr, u32 bcount, bool interrupt) | 371 | tsi721_desc_fill_end(struct tsi721_dma_desc *bd_ptr, u32 bcount, bool interrupt) |
| 372 | { | 372 | { |
| 373 | if (bd_ptr == NULL) | 373 | if (!bd_ptr) |
| 374 | return -EINVAL; | 374 | return -EINVAL; |
| 375 | 375 | ||
| 376 | /* Update DMA descriptor */ | 376 | /* Update DMA descriptor */ |
| @@ -555,9 +555,7 @@ static void tsi721_advance_work(struct tsi721_bdma_chan *bdma_chan, | |||
| 555 | * If there is no data transfer in progress, fetch new descriptor from | 555 | * If there is no data transfer in progress, fetch new descriptor from |
| 556 | * the pending queue. | 556 | * the pending queue. |
| 557 | */ | 557 | */ |
| 558 | 558 | if (!desc && !bdma_chan->active_tx && !list_empty(&bdma_chan->queue)) { | |
| 559 | if (desc == NULL && bdma_chan->active_tx == NULL && | ||
| 560 | !list_empty(&bdma_chan->queue)) { | ||
| 561 | desc = list_first_entry(&bdma_chan->queue, | 559 | desc = list_first_entry(&bdma_chan->queue, |
| 562 | struct tsi721_tx_desc, desc_node); | 560 | struct tsi721_tx_desc, desc_node); |
| 563 | list_del_init((&desc->desc_node)); | 561 | list_del_init((&desc->desc_node)); |
| @@ -796,7 +794,7 @@ static void tsi721_free_chan_resources(struct dma_chan *dchan) | |||
| 796 | 794 | ||
| 797 | tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); | 795 | tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); |
| 798 | 796 | ||
| 799 | if (bdma_chan->bd_base == NULL) | 797 | if (!bdma_chan->bd_base) |
| 800 | return; | 798 | return; |
| 801 | 799 | ||
| 802 | tsi721_bdma_interrupt_enable(bdma_chan, 0); | 800 | tsi721_bdma_interrupt_enable(bdma_chan, 0); |
