scsi: lpfc: remove redundant initialization to variable rc
Subsystems (3)
PATCH 1/1 scsi: lpfc: remove redundant initialization to variable rc
From: Colin Ian King <[email protected]>
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.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/scsi/lpfc/lpfc_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_attr.c +1 -1
@@ -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 ]))
Signature · 1 line
2.25.1
Martin K. Petersen
AppliedQuoted 3 lines · Colin King
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.
Applied to 5.8/scsi-queue, thanks!
[1/1] scsi: lpfc: Remove redundant initialization to variable rc
https://git.kernel.org/mkp/scsi/c/6e27a86aed97
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering