Skip to content

Commit 31028cb

Browse files
Zhen Leitiwai
authored andcommitted
ALSA: isa: Fix error return code in snd_cmi8330_probe()
When 'SB_HW_16' check fails, the error code -ENODEV instead of 0 should be returned, which is the same as that returned when 'WSS_HW_CMI8330' check fails. Fixes: 43bcd97 ("[ALSA] Add snd_card_set_generic_dev() call to ISA drivers") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210707074051.2663-1-thunder.leizhen@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent ced7c28 commit 31028cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/isa/cmi8330.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
551551
}
552552
if (acard->sb->hardware != SB_HW_16) {
553553
snd_printk(KERN_ERR PFX "SB16 not found during probe\n");
554-
return err;
554+
return -ENODEV;
555555
}
556556

557557
snd_wss_out(acard->wss, CS4231_MISC_INFO, 0x40); /* switch on MODE2 */

0 commit comments

Comments
 (0)