[PATCH] scsi: bnx2fc: Drop unesseary call to skb_transport_header

From: Jesse Taube

Date: Fri Sep 25 2026 - 10:42:35 EST


The result of `skb_transport_header` was unused, previously it had no
side effects.
commit 66e4c8d95008 ("net: warn if transport header was not set")
Added a check to prevent accesses to an uninitialized transport header
under a CONFIG_DEBUG_NET environment. Sence `skb_transport_header` was
called with an uninitialized transport header, it triggered a warning
case and a subsequent system panic.

Remove the unesseary call to `skb_transport_header` eliminating the
warning assertion and prevent the subsequent system panic.

Signed-off-by: Jesse Taube <jtaubepe@xxxxxxxxxx>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index c95b084cad69..3bff781d0531 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -533,7 +533,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)

/* Pull the header */
hp = (struct fcoe_hdr *) skb_network_header(skb);
- fh = (struct fc_frame_header *) skb_transport_header(skb);
skb_pull(skb, sizeof(struct fcoe_hdr));
fr_len = skb->len - sizeof(struct fcoe_crc_eof);

--
2.55.0