aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2014-03-21 08:56:32 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-21 11:13:14 -0400
commitd0a7b6de04dab17ee2c0cde22705d48c4ce5f6e0 (patch)
tree19cdf6709fadf816544ef621510010903b85a7d3
parentdf6f783a4ef6790780a67c491897ac45c4618735 (diff)
drm/i915/sdvo: fix questionable return value check
intel_sdvo_get_trained_inputs() returns a bool, check the status accordingly. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 9a0b71f6aed6..d27155adf5db 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1461,7 +1461,7 @@ static void intel_enable_sdvo(struct intel_encoder *encoder)
1461 u32 temp; 1461 u32 temp;
1462 bool input1, input2; 1462 bool input1, input2;
1463 int i; 1463 int i;
1464 u8 status; 1464 bool success;
1465 1465
1466 temp = I915_READ(intel_sdvo->sdvo_reg); 1466 temp = I915_READ(intel_sdvo->sdvo_reg);
1467 if ((temp & SDVO_ENABLE) == 0) { 1467 if ((temp & SDVO_ENABLE) == 0) {
@@ -1475,12 +1475,12 @@ static void intel_enable_sdvo(struct intel_encoder *encoder)
1475 for (i = 0; i < 2; i++) 1475 for (i = 0; i < 2; i++)
1476 intel_wait_for_vblank(dev, intel_crtc->pipe); 1476 intel_wait_for_vblank(dev, intel_crtc->pipe);
1477 1477
1478 status = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2); 1478 success = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2);
1479 /* Warn if the device reported failure to sync. 1479 /* Warn if the device reported failure to sync.
1480 * A lot of SDVO devices fail to notify of sync, but it's 1480 * A lot of SDVO devices fail to notify of sync, but it's
1481 * a given it the status is a success, we succeeded. 1481 * a given it the status is a success, we succeeded.
1482 */ 1482 */
1483 if (status == SDVO_CMD_STATUS_SUCCESS && !input1) { 1483 if (success && !input1) {
1484 DRM_DEBUG_KMS("First %s output reported failure to " 1484 DRM_DEBUG_KMS("First %s output reported failure to "
1485 "sync\n", SDVO_NAME(intel_sdvo)); 1485 "sync\n", SDVO_NAME(intel_sdvo));
1486 } 1486 }