* [PATCH] Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware()
@ 2025-04-10 7:34 Chen Ni
2025-04-10 17:10 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-04-10 7:34 UTC (permalink / raw)
To: yang.li, marcel, luiz.dentz; +Cc: linux-bluetooth, 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>
---
drivers/bluetooth/hci_aml.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_aml.c b/drivers/bluetooth/hci_aml.c
index dc9541e76d81..1394c575aa6d 100644
--- a/drivers/bluetooth/hci_aml.c
+++ b/drivers/bluetooth/hci_aml.c
@@ -313,8 +313,7 @@ static int aml_download_firmware(struct hci_dev *hdev, const char *fw_name)
goto exit;
exit:
- if (firmware)
- release_firmware(firmware);
+ release_firmware(firmware);
return ret;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware()
2025-04-10 7:34 [PATCH] Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware() Chen Ni
@ 2025-04-10 17:10 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2025-04-10 17:10 UTC (permalink / raw)
To: Chen Ni; +Cc: yang.li, marcel, luiz.dentz, linux-bluetooth, linux-kernel
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 10 Apr 2025 15:34:56 +0800 you wrote:
> release_firmware() checks for NULL pointers internally.
> Remove unneeded NULL check for fmw here.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/bluetooth/hci_aml.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Here is the summary with links:
- Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware()
https://git.kernel.org/bluetooth/bluetooth-next/c/b53b259e34e4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 7:34 [PATCH] Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware() Chen Ni
2025-04-10 17:10 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox