Skip to content

Commit

Permalink
ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call
Browse files Browse the repository at this point in the history
In the commit [15c75b0: ALSA: ctxfi: Fallback DMA mask to 32bit],
I forgot to put "!" at dam_set_mask() call check in cthw20k1.c (while
cthw20k2.c is OK).  This patch fixes that obvious bug.

(As a side note: although the original commit was completely wrong,
 it's still working for most of machines, as it sets to 32bit DMA mask
 in the end.  So the bug severity is low.)

Fixes: 15c75b0 ("ALSA: ctxfi: Fallback DMA mask to 32bit")
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Mar 20, 2017
1 parent 97da385 commit f363a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/ctxfi/cthw20k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ static int hw_card_start(struct hw *hw)
return err;

/* Set DMA transfer mask */
if (dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits));
} else {
dma_set_mask(&pci->dev, DMA_BIT_MASK(32));
Expand Down

0 comments on commit f363a06

Please sign in to comment.