aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2012-04-04 00:41:43 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-04-25 04:14:18 -0400
commitdb7f770968222c966e832eebc82b500b1e8ae6a1 (patch)
treeb3643ba9506f15814066573f60eb302867e1117c /drivers/scsi/be2iscsi
parentc8b25598dc587b321cf97ed192c2e83d7cdc128a (diff)
[SCSI] be2iscsi: Code cleanup, removing the goto statement
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 64100247c624..00e297d8d742 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -147,15 +147,15 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
147 struct invalidate_command_table *inv_tbl; 147 struct invalidate_command_table *inv_tbl;
148 struct be_dma_mem nonemb_cmd; 148 struct be_dma_mem nonemb_cmd;
149 unsigned int cid, tag, i, num_invalidate; 149 unsigned int cid, tag, i, num_invalidate;
150 int rc = FAILED;
151 150
152 /* invalidate iocbs */ 151 /* invalidate iocbs */
153 cls_session = starget_to_session(scsi_target(sc->device)); 152 cls_session = starget_to_session(scsi_target(sc->device));
154 session = cls_session->dd_data; 153 session = cls_session->dd_data;
155 spin_lock_bh(&session->lock); 154 spin_lock_bh(&session->lock);
156 if (!session->leadconn || session->state != ISCSI_STATE_LOGGED_IN) 155 if (!session->leadconn || session->state != ISCSI_STATE_LOGGED_IN) {
157 goto unlock; 156 spin_unlock_bh(&session->lock);
158 157 return FAILED;
158 }
159 conn = session->leadconn; 159 conn = session->leadconn;
160 beiscsi_conn = conn->dd_data; 160 beiscsi_conn = conn->dd_data;
161 phba = beiscsi_conn->phba; 161 phba = beiscsi_conn->phba;
@@ -208,9 +208,6 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
208 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, 208 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
209 nonemb_cmd.va, nonemb_cmd.dma); 209 nonemb_cmd.va, nonemb_cmd.dma);
210 return iscsi_eh_device_reset(sc); 210 return iscsi_eh_device_reset(sc);
211unlock:
212 spin_unlock_bh(&session->lock);
213 return rc;
214} 211}
215 212
216static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf) 213static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf)