From 2da57c8e4ac0933417f9fdd141bf5bebc87edc1e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sun, 15 Jan 2012 14:29:39 +0300 Subject: [PATCH] staging: precedence bug in crystalhd_stop_tx_dma_engine() The intent here is to see if we have cleared the DMA_START_BIT flag. We clear it a couple lines later. The current code has a precedence bug so it is equivalent to "if (!dma_cntrl) { ...". Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/crystalhd/crystalhd_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c index 5acf39e7cdef..eeddee9a6050 100644 --- a/drivers/staging/crystalhd/crystalhd_hw.c +++ b/drivers/staging/crystalhd/crystalhd_hw.c @@ -868,8 +868,7 @@ static enum BC_STATUS crystalhd_stop_tx_dma_engine(struct crystalhd_hw *hw) BCMLOG(BCMLOG_DBG, "Stopping TX DMA Engine..\n"); - /* FIXME: jarod: invert dma_ctrl and check bit? or are there missing parens? */ - if (!dma_cntrl & DMA_START_BIT) { + if (!(dma_cntrl & DMA_START_BIT)) { BCMLOG(BCMLOG_DBG, "Already Stopped\n"); return BC_STS_SUCCESS; } -- 2.30.2