iscsi-target: remove unnecessary check in iscsit_setup_np error path
authorJoern Engel <joern@logfs.org>
Tue, 2 Sep 2014 21:49:53 +0000 (17:49 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 17 Sep 2014 20:36:13 +0000 (13:36 -0700)
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>
drivers/target/iscsi/iscsi_target_login.c

index 02d5ccd0eaa1d636b8ef7bb809c0e65de564b96a..480f2e0ecc1170884c5f56ca38644fab1465a0de 100644 (file)
@@ -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;
 }