aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libfc/fc_exch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index bdae9a9e7ae9..8ce418296537 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -1718,7 +1718,7 @@ retry:
1718 */ 1718 */
1719static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp) 1719static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp)
1720{ 1720{
1721 struct fc_exch *ep; /* request or subject exchange */ 1721 struct fc_exch *ep = NULL; /* request or subject exchange */
1722 struct fc_els_rrq *rp; 1722 struct fc_els_rrq *rp;
1723 u32 sid; 1723 u32 sid;
1724 u16 xid; 1724 u16 xid;
@@ -1768,15 +1768,16 @@ static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp)
1768 * Send LS_ACC. 1768 * Send LS_ACC.
1769 */ 1769 */
1770 fc_seq_ls_acc(sp); 1770 fc_seq_ls_acc(sp);
1771 fc_frame_free(fp); 1771 goto out;
1772 return;
1773 1772
1774unlock_reject: 1773unlock_reject:
1775 spin_unlock_bh(&ep->ex_lock); 1774 spin_unlock_bh(&ep->ex_lock);
1776 fc_exch_release(ep); /* drop hold from fc_exch_find */
1777reject: 1775reject:
1778 fc_seq_ls_rjt(sp, ELS_RJT_LOGIC, explan); 1776 fc_seq_ls_rjt(sp, ELS_RJT_LOGIC, explan);
1777out:
1779 fc_frame_free(fp); 1778 fc_frame_free(fp);
1779 if (ep)
1780 fc_exch_release(ep); /* drop hold from fc_exch_find */
1780} 1781}
1781 1782
1782struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport, 1783struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport,