[alsa-devel] [PATCH] ALSA: sis7019: fix error return code in sis_chip_create()
Wei Yongjun
weiyj.lk at gmail.com
Thu May 30 13:55:34 CEST 2013
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Fix to return a negative error code in the pci_set_dma_mask() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
sound/pci/sis7019.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index f2639a0..e413b4e 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1341,7 +1341,8 @@ static int sis_chip_create(struct snd_card *card,
if (rc)
goto error_out;
- if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
+ rc = pci_set_dma_mask(pci, DMA_BIT_MASK(30));
+ if (rc < 0) {
dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA");
goto error_out_enabled;
}
More information about the Alsa-devel
mailing list