[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <18a29b68-cc85-4139-b7c7-2514e8409a42@stanley.mountain>
Date: Fri, 19 Jul 2024 18:53:48 -0500
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Shenghao Ding <shenghao-ding@...com>
Cc: Kevin Lu <kevin-lu@...com>, Baojun Xu <baojun.xu@...com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] 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@...aro.org>
---
sound/soc/codecs/tas2781-fmwlib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.43.0
Powered by blists - more mailing lists