diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 6c104d79abe765068860a7bb14b8d4769a9f5d4c..50cf402dea298119ddcc88c4e3d2ec0669dba204 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -2150,7 +2150,7 @@ lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr, phba->soft_wwn_enable = 0; rc = lpfc_wwn_set(buf, cnt, wwpn); - if (!rc) { + if (rc) { /* not able to set wwpn, unlock it */ phba->soft_wwn_enable = 1; return rc; @@ -2231,7 +2231,7 @@ lpfc_soft_wwnn_store(struct device *dev, struct device_attribute *attr, return -EINVAL; rc = lpfc_wwn_set(buf, cnt, wwnn); - if (!rc) { + if (rc) { /* Allow wwnn to be set many times, as long as the enable * is set. However, once the wwpn is set, everything locks. */