summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tas2781-fmwlib.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-07-20 01:53:48 +0200
committerMark Brown <broonie@kernel.org>2024-07-22 14:04:51 +0200
commit92c78222168e9035a9bfb8841c2e56ce23e51f73 (patch)
tree99209de2b0eaf3bb3f18f04eba91055a3fcf47eb /sound/soc/codecs/tas2781-fmwlib.c
parentASoC: tegra: select CONFIG_SND_SIMPLE_CARD_UTILS (diff)
downloadlinux-92c78222168e9035a9bfb8841c2e56ce23e51f73.tar.xz
linux-92c78222168e9035a9bfb8841c2e56ce23e51f73.zip
ASoC: TAS2781: Fix tasdev_load_calibrated_data()
This function has a reversed if statement so it's either a no-op or it leads to a NULL dereference. Fixes: b195acf5266d ("ASoC: tas2781: Fix wrong loading calibrated data sequence") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/18a29b68-cc85-4139-b7c7-2514e8409a42@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tas2781-fmwlib.c')
-rw-r--r--sound/soc/codecs/tas2781-fmwlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index 63626b982d04..8f9a3ae7153e 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -2162,7 +2162,7 @@ static void tasdev_load_calibrated_data(struct tasdevice_priv *priv, int i)
return;
cal = cal_fmw->calibrations;
- if (cal)
+ if (!cal)
return;
load_calib_data(priv, &cal->dev_data);