[PATCH 14/16] ALSA: hda/tas2781: call cleaner functions only once

Gergo Koteles
2023-12-07T00:05:13Z

Prevent double free if only the DSP firmware is missing

Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
sound/pci/hda/tas2781_hda_i2c.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 0972345c15e5..cb8872e15bb0 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -660,11 +660,6 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
tasdevice_apply_calibration(tas_priv);

out:
- if (tas_priv->fw_state == TASDEVICE_DSP_FW_FAIL) {
- /*If DSP FW fail, kcontrol won't be created */
- tasdevice_config_info_remove(tas_priv);
- tasdevice_dsp_remove(tas_priv);
- }
mutex_unlock(&tas_hda->priv->codec_lock);
if (fmw)
release_firmware(fmw);
--
2.43.0