WSL2-Linux-Kernel/sound/aoa
Takashi Iwai 9a1c1df925 ALSA: aoa: Fix I2S device accounting
[ Upstream commit f1fae475f1 ]

i2sbus_add_dev() is supposed to return the number of probed devices,
i.e. either 1 or 0.  However, i2sbus_add_dev() has one error handling
that returns -ENODEV; this will screw up the accumulation number
counted in the caller, i2sbus_probe().

Fix the return value to 0 and add the comment for better understanding
for readers.

Fixes: f3d9478b2c ("[ALSA] snd-aoa: add snd-aoa")
Link: https://lore.kernel.org/r/20221027065233.13292-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-03 23:59:18 +09:00
..
codecs isystem: trim/fixup stdarg.h and other headers 2021-08-19 09:02:55 +09:00
core ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
fabrics ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
soundbus ALSA: aoa: Fix I2S device accounting 2022-11-03 23:59:18 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
aoa-gpio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 250 2019-06-19 17:09:08 +02:00
aoa.h ALSA: aoa: Constify snd_device_ops definitions 2020-01-03 09:24:01 +01:00