diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-06-21 20:46:58 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-07-05 22:16:56 +0300 |
commit | 9757973f41b52cd8fa7850100b8b0ae85261bcc5 (patch) | |
tree | 0989aabe5570ed785db07e3f48797d27243471f0 /drivers/gpu/drm/i915/intel_sdvo.c | |
parent | bb9e8755a4259a306cd1691b4e17c4c485d81c9e (diff) | |
download | linux-9757973f41b52cd8fa7850100b8b0ae85261bcc5.tar.xz |
drm/i915: Remove pointless if-else from sdvo code
The return value is a bool so we can just return the result of
the biwise AND. The compiler will take care of the rest.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180621174658.18823-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 36f81a96b8f6..5417c54f67da 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1401,10 +1401,7 @@ static bool intel_sdvo_connector_get_hw_state(struct intel_connector *connector) intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); - if (active_outputs & intel_sdvo_connector->output_flag) - return true; - else - return false; + return active_outputs & intel_sdvo_connector->output_flag; } bool intel_sdvo_port_enabled(struct drm_i915_private *dev_priv, |