mirror-linux/drivers/net/ethernet/qlogic
Zhen Ni fbb8bc4080 net: qed: Remove redundant NULL checks after list_first_entry()
list_first_entry() never returns NULL — if the list is empty, it still
returns a pointer to an invalid object, leading to potential invalid
memory access when dereferenced.
The calls to list_first_entry() are always guarded by !list_empty(),
which guarantees a valid entry is returned. Therefore, the additional
`if (!p_buffer) break;` checks in qed_ooo_release_connection_isles(),
qed_ooo_release_all_isles(), and qed_ooo_free() are redundant and
unreachable.

Remove the dead code for clarity and consistency with common list
handling patterns in the kernel. No functional change intended.

Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Link: https://patch.msgid.link/20250924030219.1252773-1-zhen.ni@easystack.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-26 16:43:11 -07:00
..
netxen sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
qed net: qed: Remove redundant NULL checks after list_first_entry() 2025-09-26 16:43:11 -07:00
qede Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
qlcnic Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
Kconfig
Makefile
qla3xxx.c net: Fix typos 2025-07-25 10:29:07 -07:00
qla3xxx.h