提交 8cb68c83 编写于 作者: D Daniel Vetter

drm: Fix get_property logic fumble

Yet again I've proven that I can't negate conditions :(

Testcase: igt/kms_properties/get_property-sanity
Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: NSean Paul <seanpaul@chromium.org>
Fixes: eb8eb02e ("drm: Drop modeset_lock_all from the getproperty ioctl")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Reported-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170410115445.13829-1-daniel.vetter@ffwll.ch
上级 6ce2ca58
...@@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev, ...@@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) { drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
list_for_each_entry(prop_enum, &property->enum_list, head) { list_for_each_entry(prop_enum, &property->enum_list, head) {
enum_count++; enum_count++;
if (out_resp->count_enum_blobs <= enum_count) if (out_resp->count_enum_blobs < enum_count)
continue; continue;
if (copy_to_user(&enum_ptr[copied].value, if (copy_to_user(&enum_ptr[copied].value,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册