summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2014-09-02 23:49:53 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-09-17 22:36:13 +0200
commit94e16e9c59312247de199b5f9bf141d1bd946dd0 (patch)
tree18461781004de892639fca66de470754ff56e845 /drivers/target/iscsi
parentiscsi-target: Drop duplicate __iscsi_target_login_thread check (diff)
downloadlinux-94e16e9c59312247de199b5f9bf141d1bd946dd0.tar.xz
linux-94e16e9c59312247de199b5f9bf141d1bd946dd0.zip
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 <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c3
1 files changed, 1 insertions, 2 deletions
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;
}