[PATCH] dmaengine: dmatest: fix thread_count

From: Danny Kukawka
Date: Thu Jan 26 2012 - 10:33:54 EST


It seems with commit f1aef8b6e6abf32a3a269542f95a19e2cb319f6c
another case where thread_count wasn't calculated correctly
has been overlooked.

This fix also a -Wparentheses compiler warning.

Signed-off-by: Danny Kukawka <danny.kukawka@xxxxxxxxx>
---
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 2b8661b..24225f0 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -599,7 +599,7 @@ static int dmatest_add_channel(struct dma_chan *chan)
}
if (dma_has_cap(DMA_PQ, dma_dev->cap_mask)) {
cnt = dmatest_add_threads(dtc, DMA_PQ);
- thread_count += cnt > 0 ?: 0;
+ thread_count += cnt > 0 ? cnt : 0;
}

pr_info("dmatest: Started %u threads using %s\n",
--
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/