scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store()
authorYe Bin <yebin10@huawei.com>
Wed, 16 Sep 2020 02:28:59 +0000 (10:28 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 3 Oct 2020 02:04:59 +0000 (22:04 -0400)
Fixes coccicheck warning:
drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Link: https://lore.kernel.org/r/20200916022859.349089-1-yebin10@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c

index ece6c25..e94eac1 100644 (file)
@@ -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;
 }
 
 /*