[Intel-gfx] [PATCH 2/3] drm: Sync errno values for property lookup errors
Ville Syrjala
ville.syrjala at linux.intel.com
Mon Jan 21 20:24:29 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Use ENOENT consistently for the case where the requested property
isn't found, and EINVAL for the case where the object has no
properties whatsoever. Currenrly these are handled differently
in the atomic and legacy codepaths.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 2 +-
drivers/gpu/drm/drm_mode_object.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 06390307e5a3..2a54f826cf65 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1330,7 +1330,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
DRM_DEBUG_ATOMIC("Object ID %d has no properties\n",
obj_id);
drm_mode_object_put(obj);
- ret = -ENOENT;
+ ret = -EINVAL;
goto out;
}
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index e8dac94d576d..31730d935842 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -527,6 +527,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
property = drm_mode_obj_find_prop_id(arg_obj, arg->prop_id);
if (!property) {
DRM_DEBUG_KMS("Unknown property ID %d\n", arg->prop_id);
+ ret = -ENOENT;
goto out_unref;
}
--
2.19.2
More information about the Intel-gfx
mailing list