scsi: lpfc: NVME Target: Receive buffer updates
Hello James Smart,
This is a semi-automatic email about new static checker warnings.
The patch 2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer updates" from Feb 12, 2017, leads to the following Smatch complaint:
drivers/scsi/lpfc/lpfc_sli.c:15194 lpfc_mrq_create()
warn: variable dereferenced before check 'hrq' (see line 15188)
drivers/scsi/lpfc/lpfc_sli.c
15181 cnt = 0;
15182
15183 for (idx = 0; idx < numrq; idx++) {
15184 hrq = hrqp[idx];
15185 drq = drqp[idx];
15186 cq = cqp[idx];
15187
15188 if (hrq->entry_count != drq->entry_count) {
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^Dereferences.
15189 status = -EINVAL;
15190 goto out;
15191 }
15192
15193 /* sanity check on queue memory */
15194 if (!hrq || !drq || !cq) {
^^^^^^^^^^^Too late.
15195 status = -ENODEV;
15196 goto out;
regards,
dan carpenter
Quoted 8 lines · Dan Carpenter
Hello James Smart,
This is a semi-automatic email about new static checker warnings.
The patch
2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer updates" from Feb 12, 2017, leads to the following Smatch complaint:
Thanks. Issues were addressed by patch from Colin King, and pushed in the lpfc patch set just posted. see http://marc.info/?l=linux-scsi&m=148864866515100&w=2
-- james