summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx88/cx88-alsa.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-11-20 15:57:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-20 16:17:32 -0800
commit1a47de6e4a8dc2aaf3c3fb544b60730b74abe0f1 (patch)
tree0882cd3057a935843aed8fd5d343df348adf8e99 /drivers/media/pci/cx88/cx88-alsa.c
parent1a763615688b891246c5b0a932d7a95fea4c1a68 (diff)
downloadlinux-1a47de6e4a8dc2aaf3c3fb544b60730b74abe0f1.tar.gz
linux-1a47de6e4a8dc2aaf3c3fb544b60730b74abe0f1.tar.bz2
linux-1a47de6e4a8dc2aaf3c3fb544b60730b74abe0f1.zip
various: fix pci_set_dma_mask return value checking
pci_set_dma_mask returns a negative errno value, not a bool like pci_dma_supported. This of course was just a giant test for attention :) Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Jongman Heo <jongman.heo@samsung.com> Tested-by: Jongman Heo <jongman.heo@samsung.com> [pcnet32] Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-alsa.c')
-rw-r--r--drivers/media/pci/cx88/cx88-alsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
index 0ed1b6530374..1b5268f9bb24 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -890,9 +890,9 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
return err;
}
- if (!pci_set_dma_mask(pci,DMA_BIT_MASK(32))) {
+ err = pci_set_dma_mask(pci,DMA_BIT_MASK(32));
+ if (err) {
dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
- err = -EIO;
cx88_core_put(core, pci);
return err;
}