Commit 381ba329 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel:
  drm/i915/sdvo: Handle unsupported GET_SUPPORTED_ENHANCEMENTS gracefully
  drm/i915/sdvo: Cleanup connector on error path
  drm/i915: Fix 945GM regression in e259befd
parents 65097561 cf9a2f3a
...@@ -2400,7 +2400,7 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj) ...@@ -2400,7 +2400,7 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj)
I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0); I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0);
break; break;
case 3: case 3:
if (obj_priv->fence_reg > 8) if (obj_priv->fence_reg >= 8)
fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg - 8) * 4; fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg - 8) * 4;
else else
case 2: case 2:
......
...@@ -2170,8 +2170,7 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type) ...@@ -2170,8 +2170,7 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type)
return true; return true;
err: err:
intel_sdvo_destroy_enhance_property(connector); intel_sdvo_destroy(connector);
kfree(intel_sdvo_connector);
return false; return false;
} }
...@@ -2243,8 +2242,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device) ...@@ -2243,8 +2242,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
return true; return true;
err: err:
intel_sdvo_destroy_enhance_property(connector); intel_sdvo_destroy(connector);
kfree(intel_sdvo_connector);
return false; return false;
} }
...@@ -2522,11 +2520,10 @@ static bool intel_sdvo_create_enhance_property(struct intel_sdvo *intel_sdvo, ...@@ -2522,11 +2520,10 @@ static bool intel_sdvo_create_enhance_property(struct intel_sdvo *intel_sdvo,
uint16_t response; uint16_t response;
} enhancements; } enhancements;
if (!intel_sdvo_get_value(intel_sdvo, enhancements.response = 0;
SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS, intel_sdvo_get_value(intel_sdvo,
&enhancements, sizeof(enhancements))) SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS,
return false; &enhancements, sizeof(enhancements));
if (enhancements.response == 0) { if (enhancements.response == 0) {
DRM_DEBUG_KMS("No enhancement is supported\n"); DRM_DEBUG_KMS("No enhancement is supported\n");
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment