scst: Fix an scst_register_virtual_device_node() error path

This patch fixes commit 26d7fd0e3a ("scst: Do not suspend SCSI command
processing when adding a device") / r8025.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-03-25 16:41:45 +00:00
parent 11d56f4129
commit 6a6c844545

View File

@@ -1331,7 +1331,7 @@ int scst_register_virtual_device_node(struct scst_dev_type *dev_handler,
res = mutex_lock_interruptible(&scst_mutex);
if (res != 0)
goto out_resume;
goto out;
res = scst_alloc_device(GFP_KERNEL, nodeid, &dev);
if (res != 0)
@@ -1422,13 +1422,10 @@ out_free_dev:
if (sysfs_del)
scst_dev_sysfs_del(dev);
scst_free_device(dev);
goto out_resume;
goto out;
out_unlock:
mutex_unlock(&scst_mutex);
out_resume:
scst_resume_activity();
goto out;
}
EXPORT_SYMBOL_GPL(scst_register_virtual_device_node);