From efd38b68c7472728e18861b2cfd02432a60fc39f Mon Sep 17 00:00:00 2001
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Mon, 15 May 2017 17:00:28 -0500
Subject: [PATCH] gpu: drm: i915: compress logic into one line
Git-commit: efd38b68c7472728e18861b2cfd02432a60fc39f
Patch-mainline: v4.13-rc1
References: FATE#322643 bsc#1055900
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
Acked-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/i915/intel_display.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8202,7 +8202,6 @@ static int ironlake_crtc_compute_clock(s
{
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;
@@ -8246,8 +8245,7 @@ static int ironlake_crtc_compute_clock(s
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;