Commit 74c7a2aa authored by Takashi Iwai's avatar Takashi Iwai Committed by Ben Hutchings

ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call

commit f363a066 upstream.

In the commit [15c75b09: 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: 15c75b09 ("ALSA: ctxfi: Fallback DMA mask to 32bit")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 10d1c8c6
...@@ -1904,7 +1904,7 @@ static int hw_card_start(struct hw *hw) ...@@ -1904,7 +1904,7 @@ static int hw_card_start(struct hw *hw)
return err; return err;
/* Set DMA transfer mask */ /* 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)); dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits));
} else { } else {
dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); dma_set_mask(&pci->dev, DMA_BIT_MASK(32));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment