aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/target/target_core_tpg.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index f755712a9a0d..2a573de19a9f 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -656,15 +656,9 @@ static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg)
656 spin_lock_init(&lun->lun_sep_lock); 656 spin_lock_init(&lun->lun_sep_lock);
657 init_completion(&lun->lun_ref_comp); 657 init_completion(&lun->lun_ref_comp);
658 658
659 ret = percpu_ref_init(&lun->lun_ref, core_tpg_lun_ref_release);
660 if (ret < 0)
661 return ret;
662
663 ret = core_tpg_post_addlun(se_tpg, lun, lun_access, dev); 659 ret = core_tpg_post_addlun(se_tpg, lun, lun_access, dev);
664 if (ret < 0) { 660 if (ret < 0)
665 percpu_ref_cancel_init(&lun->lun_ref);
666 return ret; 661 return ret;
667 }
668 662
669 return 0; 663 return 0;
670} 664}