Skip to content

Commit

Permalink
staging: precedence bug in crystalhd_stop_tx_dma_engine()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Feb 9, 2012
1 parent a2f9dc5 commit 2da57c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/crystalhd/crystalhd_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2da57c8

Please sign in to comment.