scst_event: fix forgotten corner case module_put

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6723 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-12-08 04:16:01 +00:00
parent a195aee513
commit 82d831be80

View File

@@ -866,7 +866,7 @@ static int scst_event_create_priv(struct file *file)
PRINT_ERROR("Unable to allocate priv (size %zd)",
sizeof(*priv));
res = -ENOMEM;
goto out;
goto out_put;
}
TRACE_MEM("priv %p allocated", priv);
@@ -891,6 +891,10 @@ static int scst_event_create_priv(struct file *file)
out:
TRACE_EXIT_RES(res);
return res;
out_put:
module_put(THIS_MODULE);
goto out;
}
static long scst_event_ioctl(struct file *file, unsigned int cmd,