ASoC: cs42l56: fix up error handling in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Dec 2020 10:07:59 +0000 (13:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 17:22:42 +0000 (18:22 +0100)
commite48a56ec0895d5eb0434ff00d29c74c223c08c5b
treebb6767da7aa45fa2c69b7eb6ffaea07c172ef335
parentc13c6c73d7a240f6942877423b5236e097045c4b
ASoC: cs42l56: fix up error handling in probe

[ Upstream commit 856fe64da84c95a1d415564b981ae3908eea2a76 ]

There are two issues with this code.  The first error path forgot to set
the error code and instead returns success.  The second error path
doesn't clean up.

Fixes: 272b5edd3b8f ("ASoC: Add support for CS42L56 CODEC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X9NE/9nK9/TuxuL+@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs42l56.c