Skip to content

Commit

Permalink
ALSA: isa: Fix error return code in snd_cmi8330_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 31028cb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhen Lei authored and gregkh committed Jul 20, 2021
1 parent 6612c41 commit 0e5f204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/isa/cmi8330.c
Expand Up @@ -548,7 +548,7 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
}
if (acard->sb->hardware != SB_HW_16) {
snd_printk(KERN_ERR PFX "SB16 not found during probe\n");
return err;
return -ENODEV;
}

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

0 comments on commit 0e5f204

Please sign in to comment.