mirror-linux/drivers/net/ethernet/qlogic/qed
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
..
Makefile
qed.h qed: Remove unused qed_db_recovery_dp 2025-04-15 08:26:28 -07:00
qed_chain.c
qed_cxt.c
qed_cxt.h
qed_dbg_hsi.h qed: Remove unused qed_print_mcp_trace_* 2025-04-15 08:26:28 -07:00
qed_dcbx.c
qed_dcbx.h
qed_debug.c qed: Don't collect too many protection override GRC elements 2025-09-14 14:25:03 -07:00
qed_debug.h
qed_dev.c net: Fix typos 2025-07-25 10:29:07 -07:00
qed_dev_api.h
qed_devlink.c devlink: Move graceful period parameter to reporter ops 2025-08-26 17:24:16 -07:00
qed_devlink.h
qed_fcoe.c
qed_fcoe.h
qed_hsi.h qed: Remove unused qed_calc_*_ctx_validation functions 2025-04-15 08:26:27 -07:00
qed_hw.c qed: Remove unused qed_ptt_invalidate 2025-04-15 08:26:27 -07:00
qed_hw.h qed: Remove unused qed_ptt_invalidate 2025-04-15 08:26:27 -07:00
qed_init_fw_funcs.c qed: Remove unused qed_calc_*_ctx_validation functions 2025-04-15 08:26:27 -07:00
qed_init_ops.c
qed_init_ops.h
qed_int.c
qed_int.h
qed_iro_hsi.h
qed_iscsi.c
qed_iscsi.h
qed_iwarp.c
qed_iwarp.h
qed_l2.c
qed_l2.h
qed_ll2.c
qed_ll2.h
qed_main.c net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
qed_mcp.c
qed_mcp.h
qed_mfw_hsi.h
qed_mng_tlv.c net: qed: reduce stack usage for TLV processing 2025-06-23 14:21:32 +01:00
qed_nvmetcp.c
qed_nvmetcp.h
qed_nvmetcp_fw_funcs.c
qed_nvmetcp_fw_funcs.h
qed_ooo.c net: qed: Remove redundant NULL checks after list_first_entry() 2025-09-26 16:43:11 -07:00
qed_ooo.h
qed_ptp.c net: Fix typos 2025-07-25 10:29:07 -07:00
qed_ptp.h
qed_rdma.c
qed_rdma.h
qed_reg_addr.h
qed_roce.c
qed_roce.h
qed_selftest.c
qed_selftest.h
qed_sp.h
qed_sp_commands.c
qed_spq.c
qed_sriov.c
qed_sriov.h
qed_vf.c
qed_vf.h