summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-07-31 23:22:14 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-07 22:16:17 -0400
commitafcd609e8e7907ccfa04fef0a3adb7d60a298ed6 (patch)
tree79e7ea2cc0d7571fe957b28f048d4b51aa6faf14 /drivers/scsi/pm8001
parenta5ac1f5d9a4285adf4e88ffde7ca8ae823d72441 (diff)
downloadlinux-afcd609e8e7907ccfa04fef0a3adb7d60a298ed6.tar.bz2
scsi: pm80xx: remove redundant assignments to variable rc
There are several occasions where variable rc is being initialized with a value that is never read and error is being re-assigned a little later on. Clean up the code by removing rc entirely and just returning the return value from the call to pm8001_issue_ssp_tmf Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 9453705f643a..7e48154e11c3 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -1308,28 +1308,22 @@ out:
int pm8001_abort_task_set(struct domain_device *dev, u8 *lun)
{
- int rc = TMF_RESP_FUNC_FAILED;
struct pm8001_tmf_task tmf_task;
tmf_task.tmf = TMF_ABORT_TASK_SET;
- rc = pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
- return rc;
+ return pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
}
int pm8001_clear_aca(struct domain_device *dev, u8 *lun)
{
- int rc = TMF_RESP_FUNC_FAILED;
struct pm8001_tmf_task tmf_task;
tmf_task.tmf = TMF_CLEAR_ACA;
- rc = pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
-
- return rc;
+ return pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
}
int pm8001_clear_task_set(struct domain_device *dev, u8 *lun)
{
- int rc = TMF_RESP_FUNC_FAILED;
struct pm8001_tmf_task tmf_task;
struct pm8001_device *pm8001_dev = dev->lldd_dev;
struct pm8001_hba_info *pm8001_ha = pm8001_find_ha_by_dev(dev);
@@ -1338,7 +1332,6 @@ int pm8001_clear_task_set(struct domain_device *dev, u8 *lun)
pm8001_printk("I_T_L_Q clear task set[%x]\n",
pm8001_dev->device_id));
tmf_task.tmf = TMF_CLEAR_TASK_SET;
- rc = pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
- return rc;
+ return pm8001_issue_ssp_tmf(dev, lun, &tmf_task);
}