[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250407063403.2772040-1-nichen@iscas.ac.cn>
Date: Mon, 7 Apr 2025 14:34:03 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: lgirdwood@...il.com,
broonie@...nel.org,
perex@...ex.cz,
tiwai@...e.com,
ckeepax@...nsource.cirrus.com,
rf@...nsource.cirrus.com,
simont@...nsource.cirrus.com,
peterz@...radead.org
Cc: patches@...nsource.cirrus.com,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] ASoC: wm_adsp: Remove unnecessary NULL check before release_firmware()
release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.
Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
sound/soc/codecs/wm_adsp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 91c8697c29c3..ffd826f30e15 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -718,12 +718,10 @@ static void wm_adsp_release_firmware_files(struct wm_adsp *dsp,
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
Powered by blists - more mailing lists