From: Sachin Kamat Date: Wed, 21 Nov 2012 10:44:40 +0000 (+0530) Subject: iscsi_target: Remove redundant null check before kfree X-Git-Tag: v4.13~10486^2~16 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b07c28aab52edffb592429637fed846c48dca0a8;p=mirror_ubuntu-bionic-kernel.git iscsi_target: Remove redundant null check before kfree kfree on null pointer is a no-op. Signed-off-by: Sachin Kamat Signed-off-by: Nicholas Bellinger --- 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); /*