Skip to content

Commit

Permalink
ALSA: sis7019: fix error return code in sis_chip_create()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Takashi Iwai committed May 31, 2013
1 parent 8a90bb5 commit 8b1dacb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/sis7019.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b1dacb

Please sign in to comment.