Skip to contentSkip to conversation

scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store

PATCH Applied Ye Bin 2 participants 3 messages Sep 16, 2020 – Oct 7, 2020

Subsystems (2)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store

Fixes coccicheck warning:
drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

---
 drivers/scsi/lpfc/lpfc_attr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +1 -2
index ece6c250ebaf..e94eac194676 100644
@@ -5338,8 +5338,7 @@ static ssize_t
 lpfc_fcp_cpu_map_store(struct device *dev, struct device_attribute *attr,
 		       const char *buf, size_t count)
 {
-	int status = -EINVAL;
-	return status;
+	return -EINVAL;
 }
 
 /*
Signature · 1 line
2.25.4
#1 lore raw

Ye,

Quoted 2 lines

Fixes coccicheck warning:
drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Applied to 5.10/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering