summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-07-07 15:40:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-20 16:21:15 +0200
commit6a0661ac25ec84ede07daf611193c61172aebf62 (patch)
treefed1495884b931d2d08c0302b832cbe6e5ce5dc0
parent661b521da1540f53ac1feacae38dcce578d208be (diff)
downloadlinux-stable-6a0661ac25ec84ede07daf611193c61172aebf62.tar.gz
linux-stable-6a0661ac25ec84ede07daf611193c61172aebf62.tar.bz2
linux-stable-6a0661ac25ec84ede07daf611193c61172aebf62.zip
ALSA: isa: Fix error return code in snd_cmi8330_probe()
[ Upstream commit 31028cbed26a8afa25533a10425ffa2ab794c76c ] 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: 43bcd973d6d0 ("[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>
-rw-r--r--sound/isa/cmi8330.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index dfedfd85f205..463906882b95 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -564,7 +564,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 */