]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libiscsi: Remove set-but-not-used variables
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 30 Mar 2016 18:27:08 +0000 (11:27 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 11 Apr 2016 20:57:09 +0000 (16:57 -0400)
Avoid that building with W=1 causes gcc to report warnings about
set-but-not-used variables.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c

index 120150a25dc3a9ec4dff13326af903ff5cd08826..c051694bfcb0f42e1e983f409a581f1da5b344d2 100644 (file)
@@ -2127,7 +2127,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
        struct iscsi_conn *conn;
        struct iscsi_task *task;
        struct iscsi_tm *hdr;
-       int rc, age;
+       int age;
 
        cls_session = starget_to_session(scsi_target(sc->device));
        session = cls_session->dd_data;
@@ -2188,10 +2188,8 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
        hdr = &conn->tmhdr;
        iscsi_prep_abort_task_pdu(task, hdr);
 
-       if (iscsi_exec_task_mgmt_fn(conn, hdr, age, session->abort_timeout)) {
-               rc = FAILED;
+       if (iscsi_exec_task_mgmt_fn(conn, hdr, age, session->abort_timeout))
                goto failed;
-       }
 
        switch (conn->tmf_state) {
        case TMF_SUCCESS: