]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: aoa: Fix I2S device accounting
authorTakashi Iwai <tiwai@suse.de>
Thu, 27 Oct 2022 06:52:33 +0000 (08:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:56:56 +0000 (23:56 +0900)
commitedc909df3f56b39a09c88fd172a394c0872bb96e
tree17b39031a835b48c4a458f7ffafa63fcc52a6dfc
parentfc92b63f951ed963012ad9f84f5b6c5147e56408
ALSA: aoa: Fix I2S device accounting

[ Upstream commit a6fb462f231774db7d0c165ae34c3dae4dc2bcc1 ]

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: 3f4ff7c5f2ad ("[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>
sound/aoa/soundbus/i2sbus/core.c