aboutsummaryrefslogtreecommitdiff
path: root/fs/devfs/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/devfs/base.c')
-rw-r--r--fs/devfs/base.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/devfs/base.c b/fs/devfs/base.c
index 8b679b67e5e..1274422a538 100644
--- a/fs/devfs/base.c
+++ b/fs/devfs/base.c
@@ -2738,10 +2738,8 @@ static int devfsd_close(struct inode *inode, struct file *file)
entry = fs_info->devfsd_first_event;
fs_info->devfsd_first_event = NULL;
fs_info->devfsd_last_event = NULL;
- if (fs_info->devfsd_info) {
- kfree(fs_info->devfsd_info);
- fs_info->devfsd_info = NULL;
- }
+ kfree(fs_info->devfsd_info);
+ fs_info->devfsd_info = NULL;
spin_unlock(&fs_info->devfsd_buffer_lock);
fs_info->devfsd_pgrp = 0;
fs_info->devfsd_task = NULL;