diff options
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 73333dc6854..8f1ebd88b9c 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -311,11 +311,10 @@ static int sysfs_release(struct inode * inode, struct file * filp) { struct sysfs_buffer *buffer = filp->private_data; - if (buffer) { - if (buffer->page) - free_page((unsigned long)buffer->page); - kfree(buffer); - } + if (buffer->page) + free_page((unsigned long)buffer->page); + kfree(buffer); + return 0; } |