drm: Reject bad property flag combinations
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 6 Mar 2018 16:48:49 +0000 (18:48 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 7 Mar 2018 16:28:34 +0000 (18:28 +0200)
commit100bc0d9963b506d4f1f0936c1d8ed17d214ef30
tree5f2e7670238b68a845688b8f48e65a712ecb94c4
parent51abc97658b954d357f6107885a3b069f497c7ff
drm: Reject bad property flag combinations

Pimp drm_property_type_valid() to check for more fails with the
property flags. Also make the check before adding the property,
and bail out if things look bad.

Since we're now chekcing for more than the type let's also
change the function name to drm_property_flags_valid().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-6-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_property.c