summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2007-11-11 11:58:17 -0500
committerAlex Deucher <alex@botch2.(none)>2007-11-11 11:58:17 -0500
commitd61b6c78aa7810a2f9b9e2d9d95aab4295de80ce (patch)
treeb1d7962aed4842db7b047ce575e4fd6afafa7553
parent342e3e207efda42ba679731c30dfb9d5e9d5643f (diff)
make sure i2c bus exists before using it
-rw-r--r--src/radeon_output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index e6b5e3f7..235f838e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -282,9 +282,11 @@ avivo_display_ddc_connected(ScrnInfoPtr pScrn, xf86OutputPtr output)
RADEONOutputPrivatePtr radeon_output = output->driver_private;
RADEONDDCType DDCType = radeon_output->DDCType;
- AVIVOI2CDoLock(output->scrn, 1);
- MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
- AVIVOI2CDoLock(output->scrn, 0);
+ if (radeon_output->pI2CBus) {
+ AVIVOI2CDoLock(output->scrn, 1);
+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
+ AVIVOI2CDoLock(output->scrn, 0);
+ }
if (MonInfo) {
if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE))
xf86OutputSetEDID(output, MonInfo);