From 95f29de2155ec8ccfda61d3282ce92544a5362b9 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 16 Nov 2011 01:53:27 +0000 Subject: [PATCH] Fix incorrect attach_tgt() errors processing in the sysfs build reported by David Pineau git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3923 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 1330caa71..477422a2b 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2749,7 +2749,6 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent, struct scst_tgt_dev *tgt_dev; struct scst_session *sess; LIST_HEAD(tmp_tgt_dev_list); - bool del_sysfs = true; TRACE_ENTRY(); @@ -2779,10 +2778,8 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent, } res = scst_acg_dev_sysfs_create(acg_dev, parent); - if (res != 0) { - del_sysfs = false; + if (res != 0) goto out_free; - } if (gen_scst_report_luns_changed) scst_report_luns_changed(acg); @@ -2803,7 +2800,7 @@ out_free: extra_tgt_dev_list_entry) { scst_free_tgt_dev(tgt_dev); } - scst_del_free_acg_dev(acg_dev, del_sysfs); + scst_del_free_acg_dev(acg_dev, false); goto out; }