]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: cs35l56: probe() should fail if the device ID is not recognized
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 3 Jul 2025 10:25:21 +0000 (11:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:35:08 +0000 (18:35 +0200)
commitc604dd2c5e6bf8b06866f6a5d749a0c98d03ee08
tree00077da4f5cad1e568ee63a84d6be8121aed208d
parent183bdb89af1b5193b1d1d9316986053b15ca6fa4
ASoC: cs35l56: probe() should fail if the device ID is not recognized

[ Upstream commit 3b3312f28ee2d9c386602f8521e419cfc69f4823 ]

Return an error from driver probe if the DEVID read from the chip is not
one supported by this driver.

In cs35l56_hw_init() there is a check for valid DEVID, but the invalid
case was returning the value of ret. At this point in the code ret == 0
so the caller would think that cs35l56_hw_init() was successful.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 84851aa055c8 ("ASoC: cs35l56: Move part of cs35l56_init() to shared library")
Link: https://patch.msgid.link/20250703102521.54204-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs35l56-shared.c