summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-12-10 13:03:39 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-10 14:14:53 +0100
commit2ca651d15aff0f613d11913e8a10e3b86b3dc44a (patch)
tree9b3be1531ade77a67a4108537e0a819b05603726
parent01073b0846c7c13438ef9b4d62e0747aed2db15d (diff)
downloadlinux-2ca651d15aff0f613d11913e8a10e3b86b3dc44a.tar.bz2
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: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/drm_crtc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index fa1b1a5b8330..4f4fcd37f110 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -4135,6 +4135,8 @@ EXPORT_SYMBOL(drm_mode_connector_update_edid_property);
static bool drm_property_change_is_valid(struct drm_property *property,
uint64_t value)
{
+ int i;
+
if (property->flags & DRM_MODE_PROP_IMMUTABLE)
return false;
@@ -4150,7 +4152,6 @@ static bool drm_property_change_is_valid(struct drm_property *property,
return false;
return true;
} else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
- int i;
uint64_t valid_mask = 0;
for (i = 0; i < property->num_values; i++)
@@ -4174,13 +4175,12 @@ static bool drm_property_change_is_valid(struct drm_property *property,
*/
obj = _object_find(property->dev, value, property->values[0]);
return obj != NULL;
- } else {
- int i;
- for (i = 0; i < property->num_values; i++)
- if (property->values[i] == value)
- return true;
- return false;
}
+
+ for (i = 0; i < property->num_values; i++)
+ if (property->values[i] == value)
+ return true;
+ return false;
}
/**