mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
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 <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user