]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: cs35l41: check the return value from spi_setup()
authorVitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Tue, 4 Mar 2025 11:56:37 +0000 (16:56 +0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:12 +0000 (14:39 +0200)
commit748a1118d20d49744ed45d4ad6cbdbe9dae5b79f
treeea84fea1d4c36b0cc16e57d3678859ca17b43793
parent5b6739341500c8dff9bb0dd3b1a62498de9cc021
ASoC: cs35l41: check the return value from spi_setup()

[ Upstream commit ad5a0970f86d82e39ebd06d45a1f7aa48a1316f8 ]

Currently the return value from spi_setup() is not checked for a failure.
It is unlikely it will ever fail in this particular case but it is still
better to add this check for the sake of completeness and correctness. This
is cheap since it is performed once when the device is being probed.

Handle spi_setup() return value.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: 872fc0b6bde8 ("ASoC: cs35l41: Set the max SPI speed for the whole device")
Signed-off-by: Vitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Link: https://patch.msgid.link/20250304115643.2748-1-v.shevtsov@mt-integration.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs35l41-spi.c