ALSA: sis7019: fix error return code in sis_chip_create()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 30 May 2013 11:55:34 +0000 (19:55 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 31 May 2013 06:19:12 +0000 (08:19 +0200)
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@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/sis7019.c

index d59abe1682c58f9d394340d48c38e1860f906e89..748e82d4d25715b43e4b6790513941fe200f0191 100644 (file)
@@ -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;
        }