aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-07-12 22:24:52 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-08-09 14:27:46 -0700
commit93ffc3e3671046c3fc641987832628aa8d2edca3 (patch)
tree0fd5389b207ae576a7e85293d9a88f0a6f7254d1
parent05b1ed7990f79388573430faf4f28c31eeaf377b (diff)
sysfs: release mutex when kmalloc() failed in sysfs_open_file().
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/sysfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index b502c7197ec..1f64ce52905 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -283,6 +283,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
mutex_lock(&inode->i_mutex);
if (!(set = inode->i_private)) {
if (!(set = inode->i_private = kmalloc(sizeof(struct sysfs_buffer_collection), GFP_KERNEL))) {
+ mutex_unlock(&inode->i_mutex);
error = -ENOMEM;
goto Done;
} else {