aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2017-05-15 17:00:28 -0500
committerDaniel Vetter <[email protected]>2017-05-16 11:28:01 +0200
commitefd38b68c7472728e18861b2cfd02432a60fc39f (patch)
treefe4c5fb77fac019aaa7f3c319378ca5145ca304d
parentcbaa331504d16489c8b207da960351e7b0afb3e2 (diff)
gpu: drm: i915: compress logic into one line
Simplify logic to avoid unnecessary variable declaration and assignment. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/20170515220028.GA15149@embeddedgus
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c0b44772d4fa..55c2c149ad0b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8192,7 +8192,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
{
struct drm_device *dev = crtc->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
- struct intel_shared_dpll *pll;
const struct intel_limit *limit;
int refclk = 120000;
@@ -8236,8 +8235,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
ironlake_compute_dpll(crtc, crtc_state, NULL);
- pll = intel_get_shared_dpll(crtc, crtc_state, NULL);
- if (pll == NULL) {
+ if (!intel_get_shared_dpll(crtc, crtc_state, NULL)) {
DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
pipe_name(crtc->pipe));
return -EINVAL;