2023-07-12 03:31:54

by Shenghao Ding

[permalink] [raw]
Subject: [PATCH v1] ALSA: hda/tas2781: fix 'fw_entry' is used uninitialized

Fix 'fw_entry' is used uninitialized.

Signed-off-by: Shenghao Ding <[email protected]>

Changes in v1:
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
---
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 eb55abae0d7b..0b08e24ed23a 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -1908,7 +1908,7 @@ int tas2781_load_calibration(void *context, char *file_name,
{
struct tasdevice_priv *tas_priv = (struct tasdevice_priv *)context;
struct tasdevice *tasdev = &(tas_priv->tasdevice[i]);
- const struct firmware *fw_entry;
+ const struct firmware *fw_entry = NULL;
struct tasdevice_fw *tas_fmw;
struct firmware fmw;
int offset = 0;
--
2.34.1