Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hannes Reinecke and committed by
Nicholas Bellinger
1ec59fee a309f489

+4 -1
+4 -1
drivers/target/loopback/tcm_loop.c
··· 932 932 struct tcm_loop_nexus *tl_nexus; 933 933 struct tcm_loop_hba *tl_hba = tpg->tl_hba; 934 934 935 - tl_nexus = tpg->tl_hba->tl_nexus; 935 + if (!tl_hba) 936 + return -ENODEV; 937 + 938 + tl_nexus = tl_hba->tl_nexus; 936 939 if (!tl_nexus) 937 940 return -ENODEV; 938 941