mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 20:51:27 +00:00
Patch from Smadar Gonen <smadar.gn@gmail.com> fixing some minor corner cases
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@994 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2848,7 +2848,7 @@ static int dev_user_unregister_dev(struct file *file)
|
||||
dev = (struct scst_user_dev *)file->private_data;
|
||||
if (dev == NULL) {
|
||||
mutex_unlock(&dev_priv_mutex);
|
||||
goto out;
|
||||
goto out_resume;
|
||||
}
|
||||
|
||||
dev->blocking = 0;
|
||||
@@ -2864,6 +2864,7 @@ static int dev_user_unregister_dev(struct file *file)
|
||||
|
||||
kfree(dev);
|
||||
|
||||
out_resume:
|
||||
scst_resume_activity();
|
||||
|
||||
out:
|
||||
@@ -3155,10 +3156,8 @@ static int dev_user_release(struct inode *inode, struct file *file)
|
||||
TRACE_ENTRY();
|
||||
|
||||
dev = (struct scst_user_dev *)file->private_data;
|
||||
if (dev == NULL) {
|
||||
mutex_unlock(&dev_priv_mutex);
|
||||
if (dev == NULL)
|
||||
goto out;
|
||||
}
|
||||
file->private_data = NULL;
|
||||
|
||||
TRACE_MGMT_DBG("Going to release dev %s", dev->name);
|
||||
|
||||
Reference in New Issue
Block a user