From 6a6c8445452cec539dff3dc9bb03f519f1183e03 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Mar 2019 16:41:45 +0000 Subject: [PATCH] scst: Fix an scst_register_virtual_device_node() error path This patch fixes commit 26d7fd0e3a4c ("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 --- scst/src/scst_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 0246dc3f6..44fbade8d 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -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);