Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tas2781: Add null check for calibration data

For avoid null pointer problem if no calibration data exist.

Fixes: 55137f5a68b5e ("ASoC: tas2781: Put three different calibrated data solution into the same data structure")

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20260319090747.2090-1-baojun.xu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Baojun Xu and committed by
Mark Brown
a437601a 5e4ed032

+3
+3
sound/soc/codecs/tas2781-fmwlib.c
··· 2550 2550 int k = i * (cali_data->cali_dat_sz_per_dev + 1); 2551 2551 int rc; 2552 2552 2553 + if (!data || !cali_data->total_sz) 2554 + return; 2555 + 2553 2556 if (data[k] != i) { 2554 2557 dev_err(priv->dev, "%s: no cal-data for dev %d from usr-spc\n", 2555 2558 __func__, i);