Commit efd38b68 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Daniel Vetter

gpu: drm: i915: compress logic into one line

Simplify logic to avoid unnecessary variable declaration and assignment.
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170515220028.GA15149@embeddedgus
parent cbaa3315
...@@ -8192,7 +8192,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc, ...@@ -8192,7 +8192,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
{ {
struct drm_device *dev = crtc->base.dev; struct drm_device *dev = crtc->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_shared_dpll *pll;
const struct intel_limit *limit; const struct intel_limit *limit;
int refclk = 120000; int refclk = 120000;
...@@ -8236,8 +8235,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc, ...@@ -8236,8 +8235,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
ironlake_compute_dpll(crtc, crtc_state, NULL); ironlake_compute_dpll(crtc, crtc_state, NULL);
pll = intel_get_shared_dpll(crtc, crtc_state, NULL); if (!intel_get_shared_dpll(crtc, crtc_state, NULL)) {
if (pll == NULL) {
DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n", DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
pipe_name(crtc->pipe)); pipe_name(crtc->pipe));
return -EINVAL; return -EINVAL;
......
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