diff options
Diffstat (limited to 'drivers/tty/vt/vc_screen.c')
-rw-r--r-- | drivers/tty/vt/vc_screen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index e4ca345873c3..d7799deacb21 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c | |||
@@ -93,7 +93,7 @@ vcs_poll_data_free(struct vcs_poll_data *poll) | |||
93 | static struct vcs_poll_data * | 93 | static struct vcs_poll_data * |
94 | vcs_poll_data_get(struct file *file) | 94 | vcs_poll_data_get(struct file *file) |
95 | { | 95 | { |
96 | struct vcs_poll_data *poll = file->private_data; | 96 | struct vcs_poll_data *poll = file->private_data, *kill = NULL; |
97 | 97 | ||
98 | if (poll) | 98 | if (poll) |
99 | return poll; | 99 | return poll; |
@@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file) | |||
122 | file->private_data = poll; | 122 | file->private_data = poll; |
123 | } else { | 123 | } else { |
124 | /* someone else raced ahead of us */ | 124 | /* someone else raced ahead of us */ |
125 | vcs_poll_data_free(poll); | 125 | kill = poll; |
126 | poll = file->private_data; | 126 | poll = file->private_data; |
127 | } | 127 | } |
128 | spin_unlock(&file->f_lock); | 128 | spin_unlock(&file->f_lock); |
129 | if (kill) | ||
130 | vcs_poll_data_free(kill); | ||
129 | 131 | ||
130 | return poll; | 132 | return poll; |
131 | } | 133 | } |