summaryrefslogtreecommitdiff
path: root/src/i830_sdvo.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-06-19 15:01:00 -0700
committerEric Anholt <eric@anholt.net>2008-06-19 15:02:06 -0700
commit6b6be2b2a7179c1c9fa12989e16076aae105f4e2 (patch)
treea1833c27561c3dd04fcf9f5d955e28b580668b42 /src/i830_sdvo.c
parent65ad29d78793c7804f133a58de80ffaa0404ca28 (diff)
Fix a crash in i830_sdvo_init error paths by setting up dev_priv earlier.
Diffstat (limited to 'src/i830_sdvo.c')
-rw-r--r--src/i830_sdvo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 8914e1b0..cdfc9c66 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1527,10 +1527,12 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
return FALSE;
}
output->driver_private = intel_output;
+ dev_priv = (struct i830_sdvo_priv *) (intel_output + 1);
+ intel_output->dev_priv = dev_priv;
+
output->interlaceAllowed = FALSE;
output->doubleScanAllowed = FALSE;
- dev_priv = (struct i830_sdvo_priv *) (intel_output + 1);
intel_output->type = I830_OUTPUT_SDVO;
intel_output->pipe_mask = ((1 << 0) | (1 << 1));
intel_output->clone_mask = (1 << I830_OUTPUT_SDVO);
@@ -1572,7 +1574,6 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
}
intel_output->pI2CBus = i2cbus;
- intel_output->dev_priv = dev_priv;
/* Read the regs to test if we can talk to the device */
for (i = 0; i < 0x40; i++) {