Merge tag 'v6.0' into rdma.git for-next
[linux-block.git] / drivers / infiniband / ulp / srp / ib_srp.c
index 66ff61e54fa99735ed19e5f8781290542a310c5a..1075c2ac8fe209deb703a97f38e5593791cfefe9 100644 (file)
@@ -1961,7 +1961,8 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
                if (scmnd) {
                        req = scsi_cmd_priv(scmnd);
                        scmnd = srp_claim_req(ch, req, NULL, scmnd);
-               } else {
+               }
+               if (!scmnd) {
                        shost_printk(KERN_ERR, target->scsi_host,
                                     "Null scmnd for RSP w/tag %#016llx received on ch %td / QP %#x\n",
                                     rsp->tag, ch - target->ch, ch->qp->qp_num);