From: Chen Ni Date: Thu, 10 Apr 2025 07:34:56 +0000 (+0800) Subject: Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware() X-Git-Tag: v6.16-rc1~132^2~47^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd3cb3c5aec80f70762c34fdd3068f07b212108e;p=thirdparty%2Flinux.git Bluetooth: hci_uart: 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/drivers/bluetooth/hci_aml.c b/drivers/bluetooth/hci_aml.c index dc9541e76d819..1394c575aa6d4 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; }