]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: lpfc: Remove redundant initialization to variable rc
authorColin Ian King <colin.king@canonical.com>
Thu, 7 May 2020 20:31:11 +0000 (21:31 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 May 2020 02:30:14 +0000 (22:30 -0400)
The variable rc is being initialized with a value that is never read and it
is being updated later with a new value.  The initialization is redundant
and can be removed.

Link: https://lore.kernel.org/r/20200507203111.64709-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Unused value")

drivers/scsi/lpfc/lpfc_attr.c

index 2791efa770afa509998fb0515077019f709b9b16..d51fe5f9e5ec0519ca6def1fc5f47b71a1d066eb 100644 (file)
@@ -4877,7 +4877,7 @@ lpfc_request_firmware_upgrade_store(struct device *dev,
        struct Scsi_Host *shost = class_to_shost(dev);
        struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
        struct lpfc_hba *phba = vport->phba;
-       int val = 0, rc = -EINVAL;
+       int val = 0, rc;
 
        /* Sanity check on user data */
        if (!isdigit(buf[0]))