From: Hannes Reinecke Date: Wed, 16 Oct 2013 07:12:52 +0000 (+0200) Subject: tcm_loop: Check for valid hba in tcm_loop_drop_nexus() X-Git-Tag: v3.13-rc1~5^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ec59fee296d798b83a11f888981531dae16bfe8;p=profile%2Fivi%2Fkernel-x86-ivi.git tcm_loop: Check for valid hba in tcm_loop_drop_nexus() Signed-off-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger --- 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;