]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tcm_loop: Check for valid hba in tcm_loop_drop_nexus()
authorHannes Reinecke <hare@suse.de>
Wed, 16 Oct 2013 07:12:52 +0000 (09:12 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 16 Oct 2013 20:44:05 +0000 (13:44 -0700)
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/loopback/tcm_loop.c

index 150bdb426fc44accc99003b87e9650919f7a803c..21b49f3517235753318313c86b81aaae11ed9ee0 100644 (file)
@@ -932,7 +932,10 @@ static int tcm_loop_drop_nexus(
        struct tcm_loop_nexus *tl_nexus;
        struct tcm_loop_hba *tl_hba = tpg->tl_hba;
 
-       tl_nexus = tpg->tl_hba->tl_nexus;
+       if (!tl_hba)
+               return -ENODEV;
+
+       tl_nexus = tl_hba->tl_nexus;
        if (!tl_nexus)
                return -ENODEV;