summaryrefslogtreecommitdiff
path: root/drivers/tty/vt/vc_screen.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-01 12:14:26 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-01 12:14:26 -0700
commit44e63941e789e10409186224ba897ab50c3fa7e0 (patch)
tree180adf775f6bb9ab401303e67fc7c6d0c0642d10 /drivers/tty/vt/vc_screen.c
parentb983e51a73b60b358e2c15a64c0c489cb266fe67 (diff)
parent07961ac7c0ee8b546658717034fe692fd12eefa9 (diff)
Merge v3.9-rc5 into usb-next
We want the fixes here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/vc_screen.c')
-rw-r--r--drivers/tty/vt/vc_screen.c6
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)
static struct vcs_poll_data *
vcs_poll_data_get(struct file *file)
{
- struct vcs_poll_data *poll = file->private_data;
+ struct vcs_poll_data *poll = file->private_data, *kill = NULL;
if (poll)
return poll;
@@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file)
file->private_data = poll;
} else {
/* someone else raced ahead of us */
- vcs_poll_data_free(poll);
+ kill = poll;
poll = file->private_data;
}
spin_unlock(&file->f_lock);
+ if (kill)
+ vcs_poll_data_free(kill);
return poll;
}