Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware()
@ 2025-03-25  8:49 Chen Ni
  2025-03-25 10:55 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-03-25  8:49 UTC (permalink / raw)
  To: shenghao-ding, kevin-lu, baojun.xu, perex, tiwai
  Cc: linux-sound, linux-kernel, Chen Ni

release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 sound/pci/hda/tas2781_hda_i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 50c5e5f26589..9ed49b0dbe6b 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -753,8 +753,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
 
 out:
 	mutex_unlock(&tas_hda->priv->codec_lock);
-	if (fmw)
-		release_firmware(fmw);
+	release_firmware(fmw);
 	pm_runtime_mark_last_busy(tas_hda->dev);
 	pm_runtime_put_autosuspend(tas_hda->dev);
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware()
  2025-03-25  8:49 [PATCH] ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware() Chen Ni
@ 2025-03-25 10:55 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-03-25 10:55 UTC (permalink / raw)
  To: Chen Ni
  Cc: shenghao-ding, kevin-lu, baojun.xu, perex, tiwai, linux-sound,
	linux-kernel

On Tue, 25 Mar 2025 09:49:39 +0100,
Chen Ni wrote:
> 
> release_firmware() checks for NULL pointers internally.
> Remove unneeded NULL check for fmw here.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-25 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25  8:49 [PATCH] ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware() Chen Ni
2025-03-25 10:55 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox