From: Chris Wilson Date: Thu, 23 Sep 2010 15:17:33 +0000 (+0100) Subject: drm/i915/sdvo: Handle unsupported GET_SUPPORTED_ENHANCEMENTS gracefully X-Git-Tag: v2.6.36-rc6~15^2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=cf9a2f3afc75d41a61cbc91e725b9ce0746c400a;p=~shefty%2Frdma-dev.git drm/i915/sdvo: Handle unsupported GET_SUPPORTED_ENHANCEMENTS gracefully In the event that the external chipset doesn't implement the GET_SUPPORTED_ENHANCEMENTS commands, gracefully treat it as having no enhancments rather than bailing. Reported-and-tested-by: Woody Suwalski Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18342 Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 60fcef700be..ee73e428a84 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -2520,11 +2520,10 @@ static bool intel_sdvo_create_enhance_property(struct intel_sdvo *intel_sdvo, uint16_t response; } enhancements; - if (!intel_sdvo_get_value(intel_sdvo, - SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS, - &enhancements, sizeof(enhancements))) - return false; - + enhancements.response = 0; + intel_sdvo_get_value(intel_sdvo, + SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS, + &enhancements, sizeof(enhancements)); if (enhancements.response == 0) { DRM_DEBUG_KMS("No enhancement is supported\n"); return true;