diff mbox series

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

Message ID 20200916022859.349089-1-yebin10@huawei.com
State Accepted
Headers show
Series scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store | expand

Commit Message

Ye Bin Sept. 16, 2020, 2:28 a.m. UTC
Fixes coccicheck warning:
drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/scsi/lpfc/lpfc_attr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Martin K. Petersen Oct. 3, 2020, 2:05 a.m. UTC | #1
Ye,

> 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!
Martin K. Petersen Oct. 7, 2020, 3:48 a.m. UTC | #2
On Wed, 16 Sep 2020 10:28:59 +0800, Ye Bin wrote:

> 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-queue, thanks!

[1/1] scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store()
      https://git.kernel.org/mkp/scsi/c/37fa429ef7ba
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index ece6c250ebaf..e94eac194676 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -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;
 }
 
 /*