summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-11-30 16:19:35 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 12:24:27 -0600
commitb5fe5e953c65cd0ec4e9ffd001072700e5b89317 (patch)
tree07fb2fcd313e43663de51b354ef7b0f259d71048 /drivers/scsi
parent3a91090fe0df10091c5612db8528ee7a822ab83d (diff)
[SCSI] libfc: fix fc_tm_done not freeing the allocated fsp pkt
Frame should be freed in fc_tm_done, this is an updated patch on the one initially submitted by Hillf Danton. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 338620b33fa..a8e0c0acc73 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1321,27 +1321,27 @@ static void fc_tm_done(struct fc_seq *seq, struct fc_frame *fp, void *arg)
*
* scsi-eh will escalate for when either happens.
*/
- return;
+ goto out;
}
if (fc_fcp_lock_pkt(fsp))
- return;
+ goto out;
/*
* raced with eh timeout handler.
*/
- if (!fsp->seq_ptr || !fsp->wait_for_comp) {
- spin_unlock_bh(&fsp->scsi_pkt_lock);
- return;
- }
+ if (!fsp->seq_ptr || !fsp->wait_for_comp)
+ goto out_unlock;
fh = fc_frame_header_get(fp);
if (fh->fh_type != FC_TYPE_BLS)
fc_fcp_resp(fsp, fp);
fsp->seq_ptr = NULL;
fsp->lp->tt.exch_done(seq);
- fc_frame_free(fp);
+out_unlock:
fc_fcp_unlock_pkt(fsp);
+out:
+ fc_frame_free(fp);
}
/**