target/cxgbit: Fix cxgbit_fw4_ack()
Subsystems (2)
PATCH 1/1 target/cxgbit: Fix cxgbit_fw4_ack()
Use the pointer 'p' after having tested that pointer instead of before.
Reported-by Dan Carpenter <[email protected]>
Cc Varun Prakash <[email protected]>
Cc Nicholas Bellinger <[email protected]>
Cc <[email protected]>
Fixes 5cadafb236df ("target/cxgbit: Fix endianness annotations")
Signed-off-by Bart Van Assche <[email protected]>
--- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/target/iscsi/cxgbit/cxgbit_cm.c +2 -1
@@ -1831,7 +1831,7 @@ static void cxgbit_fw4_ack(struct cxgbit_sock *csk, struct sk_buff *skb)while (credits) {struct sk_buff *p =cxgbit_sock_peek_wr (csk); -const u32 csum = (__force u32 )p->csum; +u32 csum;if (unlikely (!p)) { pr_err("csk 0x%p,%u, cr %u,%u+%u, empty.\n",
@@ -1840,6 +1840,7 @@ static void cxgbit_fw4_ack(struct cxgbit_sock *csk, struct sk_buff *skb)break ; } + csum = (__force u32 )p->csum;if (unlikely (credits < csum)) { pr_warn("csk 0x%p,%u, cr %u,%u+%u, < %u.\n", csk, csk->tid,
Signature · 1 line
2.23.0
Quoted 2 lines
Use the pointer 'p' after having tested that pointer instead of before.
Thanks, Bart! Applied to 5.4/scsi-fixes.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering