summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-05-28 11:23:35 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-05-28 11:23:35 +0100
commit5fa114d945fc4ee5d9e89dc18d99584b02baa678 (patch)
treefc4911392f8776a323da321db8d4123fc0c0dfaf /src/sna/sna_driver.c
parentfb1643f0f904eb258da71cd0b8deb8d3ec6dafed (diff)
sna: sna_set_desired_mode() always returns true, make it void
Since sna_set_desired_mode() always returns true, we can make it void and remove some unreachable code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 4e76fd0e..b1011b74 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -199,7 +199,7 @@ sna_set_fallback_mode(ScrnInfoPtr scrn)
#endif
}
-static Bool sna_set_desired_mode(struct sna *sna)
+static void sna_set_desired_mode(struct sna *sna)
{
ScrnInfoPtr scrn = sna->scrn;
@@ -212,7 +212,6 @@ static Bool sna_set_desired_mode(struct sna *sna)
}
sna_mode_check(sna);
- return TRUE;
}
/**
@@ -282,7 +281,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
if (serverGeneration == 1 && (sna->flags & SNA_IS_HOSTED) == 0)
sna_copy_fbcon(sna);
- (void)sna_set_desired_mode(sna);
+ sna_set_desired_mode(sna);
}
return TRUE;
@@ -1217,13 +1216,8 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
sna_mode_discover(sna);
sna->flags &= ~SNA_REPROBE;
}
- sna_mode_check(sna);
- if (!sna_set_desired_mode(sna)) {
- sna_accel_leave(sna);
- intel_put_master(sna->dev);
- return FALSE;
- }
+ sna_set_desired_mode(sna);
return TRUE;
}