diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-07-12 22:24:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-08-09 14:27:46 -0700 |
commit | 93ffc3e3671046c3fc641987832628aa8d2edca3 (patch) | |
tree | 0fd5389b207ae576a7e85293d9a88f0a6f7254d1 /fs | |
parent | 05b1ed7990f79388573430faf4f28c31eeaf377b (diff) | |
download | lwn-93ffc3e3671046c3fc641987832628aa8d2edca3.tar.gz lwn-93ffc3e3671046c3fc641987832628aa8d2edca3.zip |
sysfs: release mutex when kmalloc() failed in sysfs_open_file().
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysfs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index b502c7197ec0..1f64ce529051 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 { |