summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-10-16 09:12:52 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2013-10-16 13:44:05 -0700
commit1ec59fee296d798b83a11f888981531dae16bfe8 (patch)
tree50d0eb776047f10b40c142d3966eecd3e369d8a5 /drivers/target
parenta309f489608f09c5053a2fb4ae8e3d849adb2b33 (diff)
downloadop-kernel-dev-1ec59fee296d798b83a11f888981531dae16bfe8.zip
op-kernel-dev-1ec59fee296d798b83a11f888981531dae16bfe8.tar.gz
tcm_loop: Check for valid hba in tcm_loop_drop_nexus()
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/loopback/tcm_loop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 150bdb4..21b49f3 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -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;
OpenPOWER on IntegriCloud