summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tas5720.c
diff options
context:
space:
mode:
authorYing Liu <lyre@hust.edu.cn>2023-04-11 20:09:12 +0300
committerMark Brown <broonie@kernel.org>2023-04-12 14:52:00 +0300
commitd93ee84e3eb5d1afc081e57ca37f1411a01f2c94 (patch)
tree5ab297fb1120df4df2e452b77139c089c011280e /sound/soc/codecs/tas5720.c
parentef0128afa1655f8d024dc5058fbfa0c6deecf117 (diff)
downloadlinux-d93ee84e3eb5d1afc081e57ca37f1411a01f2c94.tar.xz
ASoC: tas5720: add missing unwind goto in tas5720_codec_probe
Smatch complains that missing unwind goto in tas5720_codec_probe. When tas5720 has an invalid devtype, it is expected to invoke regulator_bulk_disable to handle the failure. But the default option return an error code directly. Fix it by reusing the probe_fail label. Signed-off-by: Ying Liu <lyre@hust.edu.cn> Link: https://lore.kernel.org/r/20230411170912.1939906-1-lyre@hust.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tas5720.c')
-rw-r--r--sound/soc/codecs/tas5720.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index de6d01c8fdd3..4d27b60bd804 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -339,7 +339,8 @@ static int tas5720_codec_probe(struct snd_soc_component *component)
break;
default:
dev_err(component->dev, "unexpected private driver data\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto probe_fail;
}
if (device_id != expected_device_id)