Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f02e9dd authored by Zhen Lei's avatar Zhen Lei Committed by Greg Kroah-Hartman
Browse files

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: 43bcd973 ("[ALSA] Add snd_card_set_generic_dev() call to ISA drivers")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210707074051.2663-1-thunder.leizhen@huawei.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent aa886653
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -549,7 +549,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 */