From: Joern Engel Date: Tue, 2 Sep 2014 21:49:53 +0000 (-0400) Subject: iscsi-target: remove unnecessary check in iscsit_setup_np error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=94e16e9c59312247de199b5f9bf141d1bd946dd0;p=linux-beck.git iscsi-target: remove unnecessary check in iscsit_setup_np error path Found by coverity. At this point sock is non-NULL, so the check to unnecessary. Signed-off-by: Joern Engel Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 02d5ccd0eaa1..480f2e0ecc11 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -978,8 +978,7 @@ int iscsit_setup_np( return 0; fail: np->np_socket = NULL; - if (sock) - sock_release(sock); + sock_release(sock); return ret; }