mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst_main: Fix up the error handling
We should clear sysfs during copy manager device registration failure. Otherwise, we will not be able to re-register this device, since the sysfs for it has already been created.
This commit is contained in:
@@ -1356,8 +1356,10 @@ int scst_register_virtual_device_node(struct scst_dev_type *dev_handler,
|
||||
list_add_tail(&dev->dev_list_entry, &scst_dev_list);
|
||||
|
||||
res = scst_cm_on_dev_register(dev);
|
||||
if (res != 0)
|
||||
if (res != 0) {
|
||||
sysfs_del = true;
|
||||
goto out_unreg;
|
||||
}
|
||||
|
||||
mutex_unlock(&scst_mutex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user