public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware()
@ 2025-04-07  6:19 Chen Ni
  2025-04-07  6:49 ` Andy Shevchenko
  2025-04-07  7:19 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Ni @ 2025-04-07  6:19 UTC (permalink / raw)
  To: perex, tiwai, dan.carpenter, baojun.xu, broonie, ckeepax,
	andriy.shevchenko, nathan
  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_spi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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);
 }
-- 
2.25.1


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

* Re: [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware()
  2025-04-07  6:19 [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware() Chen Ni
@ 2025-04-07  6:49 ` Andy Shevchenko
  2025-04-07  7:19 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-04-07  6:49 UTC (permalink / raw)
  To: Chen Ni
  Cc: perex, tiwai, dan.carpenter, baojun.xu, broonie, ckeepax, nathan,
	linux-sound, linux-kernel

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>

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware()
  2025-04-07  6:19 [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware() Chen Ni
  2025-04-07  6:49 ` Andy Shevchenko
@ 2025-04-07  7:19 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2025-04-07  7:19 UTC (permalink / raw)
  To: Chen Ni
  Cc: perex, tiwai, dan.carpenter, baojun.xu, broonie, ckeepax,
	andriy.shevchenko, nathan, linux-sound, linux-kernel

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

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

end of thread, other threads:[~2025-04-07  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  6:19 [PATCH] ALSA: hda/tas2781: Remove unnecessary NULL check before release_firmware() Chen Ni
2025-04-07  6:49 ` Andy Shevchenko
2025-04-07  7:19 ` Takashi Iwai

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