From 3e0c6284b28aea46bcbf42377ed247b3b9fced0a Mon Sep 17 00:00:00 2001 From: Jayamohan Kallickal Date: Tue, 3 Apr 2012 23:41:43 -0500 Subject: [PATCH] --- yaml --- r: 302458 b: refs/heads/master c: db7f770968222c966e832eebc82b500b1e8ae6a1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/scsi/be2iscsi/be_main.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 33f4acd06f68..38e95e811d37 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c8b25598dc587b321cf97ed192c2e83d7cdc128a +refs/heads/master: db7f770968222c966e832eebc82b500b1e8ae6a1 diff --git a/trunk/drivers/scsi/be2iscsi/be_main.c b/trunk/drivers/scsi/be2iscsi/be_main.c index 64100247c624..00e297d8d742 100644 --- a/trunk/drivers/scsi/be2iscsi/be_main.c +++ b/trunk/drivers/scsi/be2iscsi/be_main.c @@ -147,15 +147,15 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) struct invalidate_command_table *inv_tbl; struct be_dma_mem nonemb_cmd; unsigned int cid, tag, i, num_invalidate; - int rc = FAILED; /* invalidate iocbs */ cls_session = starget_to_session(scsi_target(sc->device)); session = cls_session->dd_data; spin_lock_bh(&session->lock); - if (!session->leadconn || session->state != ISCSI_STATE_LOGGED_IN) - goto unlock; - + if (!session->leadconn || session->state != ISCSI_STATE_LOGGED_IN) { + spin_unlock_bh(&session->lock); + return FAILED; + } conn = session->leadconn; beiscsi_conn = conn->dd_data; phba = beiscsi_conn->phba; @@ -208,9 +208,6 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, nonemb_cmd.va, nonemb_cmd.dma); return iscsi_eh_device_reset(sc); -unlock: - spin_unlock_bh(&session->lock); - return rc; } static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf)