staging: precedence bug in crystalhd_stop_tx_dma_engine()
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 15 Jan 2012 11:29:39 +0000 (14:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 17:13:55 +0000 (09:13 -0800)
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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/crystalhd/crystalhd_hw.c

index 5acf39e7cdef730b7d55a4d19bb0c219759d7051..eeddee9a6050632fd08cc56b38792502c1e81cab 100644 (file)
@@ -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;
        }