From e80a15bfd3252ac691390bb477098b3e792bc194 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 28 Jun 2012 22:35:49 +0000 Subject: [PATCH] scst_assign_dev_handler(): detach if attach only succeeded partially Partial attach failure should result in calling detach for those handlers for which attach succeeded Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4387 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 0d448701d..6990325c7 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1868,7 +1868,7 @@ assign: if (res != 0) { PRINT_ERROR("Device handler's %s attach_tgt() " "failed: %d", handler->name, res); - goto out_err_remove_sysfs; + goto out_err_detach_tgt; } list_add_tail(&tgt_dev->extra_tgt_dev_list_entry, &attached_tgt_devs); @@ -1894,7 +1894,6 @@ out_err_detach_tgt: } } -out_err_remove_sysfs: scst_devt_dev_sysfs_del(dev); out_detach: