diff mbox series

ASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware()

Message ID 20250407062725.2771916-1-nichen@iscas.ac.cn (mailing list archive)
State New
Headers show
Series ASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware() | expand

Commit Message

Chen Ni April 7, 2025, 6:27 a.m. UTC
release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 sound/soc/codecs/tas2781-i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index b950914b7d48..8d8a84a53766 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -1505,8 +1505,7 @@  static void tasdevice_fw_ready(const struct firmware *fmw,
 		tasdevice_dsp_remove(tas_priv);
 	}
 	mutex_unlock(&tas_priv->codec_lock);
-	if (fmw)
-		release_firmware(fmw);
+	release_firmware(fmw);
 }
 
 static int tasdevice_dapm_event(struct snd_soc_dapm_widget *w,