On Tue, Mar 13, 2018 at 05:07:57PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
> 
> No need to store the return value in a variable since we don't have to
> do any unwinding.
> 
> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_modes.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 5a8033fda4e3..4157250140b0 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1596,12 +1596,8 @@ int drm_mode_convert_umode(struct drm_device *dev,
>                          struct drm_display_mode *out,
>                          const struct drm_mode_modeinfo *in)
>  {
> -     int ret = -EINVAL;
> -
> -     if (in->clock > INT_MAX || in->vrefresh > INT_MAX) {
> -             ret = -ERANGE;
> -             goto out;
> -     }
> +     if (in->clock > INT_MAX || in->vrefresh > INT_MAX)
> +             return -ERANGE;
>  
>       out->clock = in->clock;
>       out->hdisplay = in->hdisplay;
> @@ -1622,14 +1618,11 @@ int drm_mode_convert_umode(struct drm_device *dev,
>  
>       out->status = drm_mode_validate_driver(dev, out);
>       if (out->status != MODE_OK)
> -             goto out;
> +             return -EINVAL;
>  
>       drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V);
>  
> -     ret = 0;
> -
> -out:
> -     return ret;
> +     return 0;
>  }
>  
>  /**
> -- 
> 2.16.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to