summaryrefslogtreecommitdiff
path: root/linux-core/intel_sdvo.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-06-06 15:21:57 +1000
committerDave Airlie <airlied@linux.ie>2008-06-06 15:21:57 +1000
commitec774e4d7201cf875a48cd2fb799e8e5b7f30cc8 (patch)
tree92d856408d18faebfd79f9ea86ca8a6c61b8483d /linux-core/intel_sdvo.c
parentbe501f00a3c91a8ae78189577873d8a6b8ea1c67 (diff)
parent03bf1fba67413f381d2a548fe08bd634a48fcc48 (diff)
Merge remote branch 'origin/modesetting-101' into modesetting-101-fb
Diffstat (limited to 'linux-core/intel_sdvo.c')
-rw-r--r--linux-core/intel_sdvo.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/linux-core/intel_sdvo.c b/linux-core/intel_sdvo.c
index ef67ef9b..f0a47e2e 100644
--- a/linux-core/intel_sdvo.c
+++ b/linux-core/intel_sdvo.c
@@ -1036,10 +1036,8 @@ void intel_sdvo_init(struct drm_device *dev, int output_device)
else
i2cbus = intel_i2c_create(dev, GPIOE, "SDVOCTRL_E for SDVOC");
- if (i2cbus == NULL) {
- intel_sdvo_destroy(connector);
- return;
- }
+ if (!i2cbus)
+ goto err_connector;
sdvo_priv->i2c_bus = i2cbus;
@@ -1061,8 +1059,7 @@ void intel_sdvo_init(struct drm_device *dev, int output_device)
if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) {
DRM_DEBUG("No SDVO device found on SDVO%c\n",
output_device == SDVOB ? 'B' : 'C');
- intel_sdvo_destroy(connector);
- return;
+ goto err_i2c;
}
}
@@ -1107,8 +1104,7 @@ void intel_sdvo_init(struct drm_device *dev, int output_device)
DRM_DEBUG("%s: No active RGB or TMDS outputs (0x%02x%02x)\n",
SDVO_NAME(sdvo_priv),
bytes[0], bytes[1]);
- intel_sdvo_destroy(connector);
- return;
+ goto err_i2c;
}
drm_encoder_init(dev, &intel_output->enc, &intel_sdvo_enc_funcs, encoder_type);
@@ -1143,6 +1139,15 @@ void intel_sdvo_init(struct drm_device *dev, int output_device)
sdvo_priv->caps.output_flags &
(SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N');
- intel_output->ddc_bus = i2cbus;
+ intel_output->ddc_bus = i2cbus;
+
+ return;
+err_i2c:
+ intel_i2c_destroy(intel_output->i2c_bus);
+err_connector:
+ drm_connector_cleanup(connector);
+ kfree(intel_output);
+
+ return;
}