* [patch] staging: precedence bug in crystalhd_stop_tx_dma_engine()
@ 2012-01-15 11:29 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-01-15 11:29 UTC (permalink / raw)
To: kernel-janitors
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>
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c
index 5acf39e..eeddee9 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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-15 11:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 11:29 [patch] staging: precedence bug in crystalhd_stop_tx_dma_engine() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).