Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: cs35l56: Remove unnecessary NULL check before release_firmware()
@ 2025-03-25  8:46 Chen Ni
  2025-03-25 10:55 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-03-25  8:46 UTC (permalink / raw)
  To: david.rhodes, rf, perex, tiwai
  Cc: linux-sound, patches, 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/cs35l56_hda.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 4ef7878e8fd4..235d22049aa9 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -546,12 +546,10 @@ static void cs35l56_hda_release_firmware_files(const struct firmware *wmfw_firmw
 					       const struct firmware *coeff_firmware,
 					       char *coeff_filename)
 {
-	if (wmfw_firmware)
-		release_firmware(wmfw_firmware);
+	release_firmware(wmfw_firmware);
 	kfree(wmfw_filename);
 
-	if (coeff_firmware)
-		release_firmware(coeff_firmware);
+	release_firmware(coeff_firmware);
 	kfree(coeff_filename);
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2025-03-25 10:55 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:46 [PATCH] ALSA: hda: cs35l56: 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