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>
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;
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++)
*/
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;
}
/**