Message ID | 20200916022859.349089-1-yebin10@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store | expand |
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!
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 --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; } /*
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(-)