OSDN Git Service

Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[android-x86/kernel.git] / drivers / target / iscsi / iscsi_target_login.c
index 7aa35e5..1794c75 100644 (file)
@@ -1243,12 +1243,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
                if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
                        spin_unlock_bh(&np->np_thread_lock);
                        complete(&np->np_restart_comp);
-                       if (ret == -ENODEV) {
-                               iscsit_put_transport(conn->conn_transport);
-                               kfree(conn);
-                               conn = NULL;
+                       iscsit_put_transport(conn->conn_transport);
+                       kfree(conn);
+                       conn = NULL;
+                       if (ret == -ENODEV)
                                goto out;
-                       }
                        /* Get another socket */
                        return 1;
                }