]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
gpu: drm: i915: compress logic into one line
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Mon, 15 May 2017 22:00:28 +0000 (17:00 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 16 May 2017 09:28:01 +0000 (11:28 +0200)
Simplify logic to avoid unnecessary variable declaration and assignment.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170515220028.GA15149@embeddedgus
drivers/gpu/drm/i915/intel_display.c

index c0b44772d4fa336ab5c398d2d0705f132db586b5..55c2c149ad0b11dde3857fe8e45a6dd70d45e0d7 100644 (file)
@@ -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;