diff options
Diffstat (limited to 'fs/sysfs/file.c')
-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 73333dc68545..8f1ebd88b9ce 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) | |||
311 | { | 311 | { |
312 | struct sysfs_buffer *buffer = filp->private_data; | 312 | struct sysfs_buffer *buffer = filp->private_data; |
313 | 313 | ||
314 | if (buffer) { | 314 | if (buffer->page) |
315 | if (buffer->page) | 315 | free_page((unsigned long)buffer->page); |
316 | free_page((unsigned long)buffer->page); | 316 | kfree(buffer); |
317 | kfree(buffer); | 317 | |
318 | } | ||
319 | return 0; | 318 | return 0; |
320 | } | 319 | } |
321 | 320 | ||