diff mbox series

ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware()

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

Commit Message

Chen Ni April 7, 2025, 6:19 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/pci/hda/tas2781_hda_spi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Andy Shevchenko April 7, 2025, 6:49 a.m. UTC | #1
On Mon, Apr 07, 2025 at 02:19:39PM +0800, Chen Ni wrote:
> release_firmware() checks for NULL pointers internally.
> Remove unneeded NULL check for fmw here.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Takashi Iwai April 7, 2025, 7:19 a.m. UTC | #2
On Mon, 07 Apr 2025 08:19:39 +0200,
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>

Applied now.  Thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c
index 399f2e4c3b62..25175ff4b3aa 100644
--- a/sound/pci/hda/tas2781_hda_spi.c
+++ b/sound/pci/hda/tas2781_hda_spi.c
@@ -1003,8 +1003,7 @@  static void tasdev_fw_ready(const struct firmware *fmw, void *context)
 	 */
 
 out:
-	if (fmw)
-		release_firmware(fmw);
+	release_firmware(fmw);
 	pm_runtime_mark_last_busy(tas_hda->priv->dev);
 	pm_runtime_put_autosuspend(tas_hda->priv->dev);
 }