summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-12-02 17:59:26 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-12-02 17:59:26 +0000
commit33eac2e3fe2a9af547dc43981b8f0e51ed2610cb (patch)
treed002bbb43cc0e4e404a0236d28b5428cde7f58c2
parent54d08152bac57b1cfdfce32ce817665c6725dca1 (diff)
Check return value of I830MapMMIO().
Allows the server to fail with a useful error message instead of segfaulting later, like reported by Alexei Malinin on misc@.
-rw-r--r--driver/xf86-video-intel/src/intel_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/xf86-video-intel/src/intel_driver.c b/driver/xf86-video-intel/src/intel_driver.c
index 90630a7c9..83e88c10a 100644
--- a/driver/xf86-video-intel/src/intel_driver.c
+++ b/driver/xf86-video-intel/src/intel_driver.c
@@ -1186,7 +1186,8 @@ static Bool i830_user_modesetting_init(ScrnInfoPtr scrn)
intel_screen_private *intel = intel_get_screen_private(scrn);
int i, num_pipe;
- I830MapMMIO(scrn);
+ if (!I830MapMMIO(scrn))
+ return FALSE;
if (DEVICE_ID(intel->PciInfo) == PCI_CHIP_E7221_G)
num_pipe = 1;