aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-11-26 23:24:14 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-06 21:17:17 -0500
commitdfbf53ed548e838ab933d1a7072ffc38cba3bae8 (patch)
tree1dbe865d4acf7444b04a99376cb445a52d4a9c41
parent03927c8acb63100046260711c06ba28b6b5936fb (diff)
vgaarb: remove bogus checks
neither ->release() nor ->poll() can be called unless ->open() has succeeded on the same struct file, so checking for "has open() failed" is pointless. What's more, ->poll() doesn't return -E... - it always returns a bitmap of POLL... values, so the dead code in that one had been actively bogus. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--drivers/gpu/vga/vgaarb.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 3166e4bc4eb6..de083aade105 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -1161,12 +1161,8 @@ done:
1161 1161
1162static unsigned int vga_arb_fpoll(struct file *file, poll_table *wait) 1162static unsigned int vga_arb_fpoll(struct file *file, poll_table *wait)
1163{ 1163{
1164 struct vga_arb_private *priv = file->private_data;
1165
1166 pr_debug("%s\n", __func__); 1164 pr_debug("%s\n", __func__);
1167 1165
1168 if (priv == NULL)
1169 return -ENODEV;
1170 poll_wait(file, &vga_wait_queue, wait); 1166 poll_wait(file, &vga_wait_queue, wait);
1171 return POLLIN; 1167 return POLLIN;
1172} 1168}
@@ -1207,9 +1203,6 @@ static int vga_arb_release(struct inode *inode, struct file *file)
1207 1203
1208 pr_debug("%s\n", __func__); 1204 pr_debug("%s\n", __func__);
1209 1205
1210 if (priv == NULL)
1211 return -ENODEV;
1212
1213 spin_lock_irqsave(&vga_user_lock, flags); 1206 spin_lock_irqsave(&vga_user_lock, flags);
1214 list_del(&priv->list); 1207 list_del(&priv->list);
1215 for (i = 0; i < MAX_USER_CARDS; i++) { 1208 for (i = 0; i < MAX_USER_CARDS; i++) {