drm: Nuke the useless 'ret' variable from drm_mode_convert_umode()
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.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
80343b3e47
commit
df550548c6
|
@ -1596,12 +1596,8 @@ int drm_mode_convert_umode(struct drm_device *dev,
|
||||||
struct drm_display_mode *out,
|
struct drm_display_mode *out,
|
||||||
const struct drm_mode_modeinfo *in)
|
const struct drm_mode_modeinfo *in)
|
||||||
{
|
{
|
||||||
int ret = -EINVAL;
|
if (in->clock > INT_MAX || in->vrefresh > INT_MAX)
|
||||||
|
return -ERANGE;
|
||||||
if (in->clock > INT_MAX || in->vrefresh > INT_MAX) {
|
|
||||||
ret = -ERANGE;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
out->clock = in->clock;
|
out->clock = in->clock;
|
||||||
out->hdisplay = in->hdisplay;
|
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);
|
out->status = drm_mode_validate_driver(dev, out);
|
||||||
if (out->status != MODE_OK)
|
if (out->status != MODE_OK)
|
||||||
goto out;
|
return -EINVAL;
|
||||||
|
|
||||||
drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V);
|
drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V);
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue