summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-21 11:44:40 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-28 07:49:20 +0100
commitb07c28aab52edffb592429637fed846c48dca0a8 (patch)
treeb20cae3629c03407afa416b94056947eeab7cf09 /drivers/target
parenttarget/iblock: Forward declare bio helpers (diff)
downloadlinux-b07c28aab52edffb592429637fed846c48dca0a8.tar.xz
linux-b07c28aab52edffb592429637fed846c48dca0a8.zip
iscsi_target: Remove redundant null check before kfree
kfree on null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 7bf9ccccb588..fdb632f0ab85 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1118,10 +1118,8 @@ new_sess_out:
idr_remove(&sess_idr, conn->sess->session_index);
spin_unlock_bh(&sess_idr_lock);
}
- if (conn->sess->sess_ops)
- kfree(conn->sess->sess_ops);
- if (conn->sess)
- kfree(conn->sess);
+ kfree(conn->sess->sess_ops);
+ kfree(conn->sess);
old_sess_out:
iscsi_stop_login_thread_timer(np);
/*