Commit 05a2eebf authored by Minghao Chi's avatar Minghao Chi Committed by Kalle Valo

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Acked-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220606014237.290466-1-chi.minghao@zte.com.cn
parent 85393ca6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment