wifi: wfx: Remove redundant NULL check before release_firmware() call

release_firmware() checks for NULL pointers internally so checking
before calling it is redundant.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Acked-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220606014237.290466-1-chi.minghao@zte.com.cn
This commit is contained in:
Minghao Chi 2022-06-06 01:42:37 +00:00 committed by Kalle Valo
parent 85393ca610
commit 05a2eebfa6

View File

@ -286,8 +286,7 @@ static int load_firmware_secure(struct wfx_dev *wdev)
error:
kfree(buf);
if (fw)
release_firmware(fw);
release_firmware(fw);
if (ret)
print_boot_status(wdev);
return ret;