aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-03-20 05:08:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-30 03:41:23 -0400
commite800ff1fade62300f2e09f0789e243337e8a8d63 (patch)
tree39211949d560be9dcf38c5a4857c62cfcea4030c
parentca79952dfc63eb5f4f731600b08c2b012b773fa7 (diff)
ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call
commit f363a06642f28caaa78cb6446bbad90c73fe183c upstream. In the commit [15c75b09f8d1: 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: 15c75b09f8d1 ("ALSA: ctxfi: Fallback DMA mask to 32bit") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/pci/ctxfi/cthw20k1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index ab4cdab5cfa5..79edd88d5cd0 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -1905,7 +1905,7 @@ static int hw_card_start(struct hw *hw)
1905 return err; 1905 return err;
1906 1906
1907 /* Set DMA transfer mask */ 1907 /* Set DMA transfer mask */
1908 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { 1908 if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
1909 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); 1909 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits));
1910 } else { 1910 } else {
1911 dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); 1911 dma_set_mask(&pci->dev, DMA_BIT_MASK(32));