[Intel-gfx] [PATCH] drm/i915: Add missing 'else' to intel_digital_port_connected()

Jani Nikula jani.nikula at linux.intel.com
Fri Feb 12 08:46:03 UTC 2016


On Thu, 11 Feb 2016, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> intel_digital_port_connected() lacks one 'else'. There's no
> actual harm in not having it since each branch has an unconditional
> return, so it can't accidentally end up in taking two branches instead
> of just the one. But let's be consistent and add the 'else' anyway.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>


> ---
>  drivers/gpu/drm/i915/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index bbe18996efe6..040b86b9797f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4551,7 +4551,7 @@ bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
>  {
>  	if (HAS_PCH_IBX(dev_priv))
>  		return ibx_digital_port_connected(dev_priv, port);
> -	if (HAS_PCH_SPLIT(dev_priv))
> +	else if (HAS_PCH_SPLIT(dev_priv))
>  		return cpt_digital_port_connected(dev_priv, port);
>  	else if (IS_BROXTON(dev_priv))
>  		return bxt_digital_port_connected(dev_priv, port);

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list