On 1/18/2017 1:50 AM, Johannes Thumshirn wrote:

@@ -4959,11 +4968,11 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct 
scsi_cmnd *cmnd,
        int status;
rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
-       if (!rdata || !rdata->pnode || !NLP_CHK_NODE_ACT(rdata->pnode))
-               return FAILED;
OK, I don't get this hunk. lpfc_rport_data_from_scsi_device() cannot return
NULL anymore?

I at least expected something like:

        rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
        if (!rdata || !rdata->pnode)
                return FAILED;
        
        pnode = rdata->pnode;
        if (!NLP_CHK_NODE_ACT(pnode)
                return FAILED;

it can and the order of precedence for the if check allows for it. I don't see any difference in what you wrote vs what's there, other than pnode gets an assignment.


Agree with all your other comments and will address them.

-- james


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to