diff mbox series

scsi: ibmvscsi_tgt: Remove unneeded variable rc

Message ID 20191101120407.GA9369@saurav (mailing list archive)
State Accepted
Headers show
Series scsi: ibmvscsi_tgt: Remove unneeded variable rc | expand

Commit Message

Saurav Girepunje Nov. 1, 2019, 12:35 p.m. UTC
Variable rc is not modified in ibmvscsis_srp_i_logout function.
So remove unneeded variable rc.

Issue found using coccicheck tool.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Tyrel Datwyler Nov. 21, 2019, 1:11 a.m. UTC | #1
On 11/1/19 5:35 AM, Saurav Girepunje wrote:
> Variable rc is not modified in ibmvscsis_srp_i_logout function.
> So remove unneeded variable rc.
> 
> Issue found using coccicheck tool.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Martin K. Petersen Nov. 22, 2019, 1:48 a.m. UTC | #2
>> Variable rc is not modified in ibmvscsis_srp_i_logout function.  So
>> remove unneeded variable rc.
>> 
>> Issue found using coccicheck tool.
>> 
>> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
>
> Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Applied to 5.5/scsi-queue, thanks.
diff mbox series

Patch

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 7f9535392a93..09a4dbd0a9e5 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -2353,7 +2353,6 @@  static long ibmvscsis_srp_i_logout(struct scsi_info *vscsi,
 {
 	struct iu_entry *iue = cmd->iue;
 	struct srp_i_logout *log_out = &vio_iu(iue)->srp.i_logout;
-	long rc = ADAPT_SUCCESS;
 
 	if ((vscsi->debit > 0) || !list_empty(&vscsi->schedule_q) ||
 	    !list_empty(&vscsi->waiting_rsp)) {
@@ -2369,7 +2368,7 @@  static long ibmvscsis_srp_i_logout(struct scsi_info *vscsi,
 		ibmvscsis_post_disconnect(vscsi, WAIT_IDLE, 0);
 	}
 
-	return rc;
+	return ADAPT_SUCCESS;
 }
 
 /* Called with intr lock held */