aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_exch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc/fc_exch.c')
-rw-r--r--drivers/scsi/libfc/fc_exch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 1b3a09473452..30f9ef0c0d4f 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -733,8 +733,6 @@ static bool fc_invoke_resp(struct fc_exch *ep, struct fc_seq *sp,
733 if (resp) { 733 if (resp) {
734 resp(sp, fp, arg); 734 resp(sp, fp, arg);
735 res = true; 735 res = true;
736 } else if (!IS_ERR(fp)) {
737 fc_frame_free(fp);
738 } 736 }
739 737
740 spin_lock_bh(&ep->ex_lock); 738 spin_lock_bh(&ep->ex_lock);
@@ -1596,7 +1594,8 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
1596 * If new exch resp handler is valid then call that 1594 * If new exch resp handler is valid then call that
1597 * first. 1595 * first.
1598 */ 1596 */
1599 fc_invoke_resp(ep, sp, fp); 1597 if (!fc_invoke_resp(ep, sp, fp))
1598 fc_frame_free(fp);
1600 1599
1601 fc_exch_release(ep); 1600 fc_exch_release(ep);
1602 return; 1601 return;
@@ -1695,7 +1694,8 @@ static void fc_exch_abts_resp(struct fc_exch *ep, struct fc_frame *fp)
1695 fc_exch_hold(ep); 1694 fc_exch_hold(ep);
1696 if (!rc) 1695 if (!rc)
1697 fc_exch_delete(ep); 1696 fc_exch_delete(ep);
1698 fc_invoke_resp(ep, sp, fp); 1697 if (!fc_invoke_resp(ep, sp, fp))
1698 fc_frame_free(fp);
1699 if (has_rec) 1699 if (has_rec)
1700 fc_exch_timer_set(ep, ep->r_a_tov); 1700 fc_exch_timer_set(ep, ep->r_a_tov);
1701 fc_exch_release(ep); 1701 fc_exch_release(ep);