Commit 2ca651d1 authored by Thierry Reding's avatar Thierry Reding Committed by Daniel Vetter

drm: Remove useless else block

All prior conditional blocks return from the function, so the else block
can be at the top level of the function.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 01073b08
...@@ -4135,6 +4135,8 @@ EXPORT_SYMBOL(drm_mode_connector_update_edid_property); ...@@ -4135,6 +4135,8 @@ EXPORT_SYMBOL(drm_mode_connector_update_edid_property);
static bool drm_property_change_is_valid(struct drm_property *property, static bool drm_property_change_is_valid(struct drm_property *property,
uint64_t value) uint64_t value)
{ {
int i;
if (property->flags & DRM_MODE_PROP_IMMUTABLE) if (property->flags & DRM_MODE_PROP_IMMUTABLE)
return false; return false;
...@@ -4150,7 +4152,6 @@ static bool drm_property_change_is_valid(struct drm_property *property, ...@@ -4150,7 +4152,6 @@ static bool drm_property_change_is_valid(struct drm_property *property,
return false; return false;
return true; return true;
} else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) { } else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
int i;
uint64_t valid_mask = 0; uint64_t valid_mask = 0;
for (i = 0; i < property->num_values; i++) for (i = 0; i < property->num_values; i++)
...@@ -4174,13 +4175,12 @@ static bool drm_property_change_is_valid(struct drm_property *property, ...@@ -4174,13 +4175,12 @@ static bool drm_property_change_is_valid(struct drm_property *property,
*/ */
obj = _object_find(property->dev, value, property->values[0]); obj = _object_find(property->dev, value, property->values[0]);
return obj != NULL; return obj != NULL;
} else { }
int i;
for (i = 0; i < property->num_values; i++) for (i = 0; i < property->num_values; i++)
if (property->values[i] == value) if (property->values[i] == value)
return true; return true;
return false; return false;
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment