On Tue, 08 Nov 2011 17:50:51 +0000
Chris Wilson <ch...@chris-wilson.co.uk> wrote:

> On Tue,  8 Nov 2011 09:38:52 -0800, Jesse Barnes <jbar...@virtuousgeek.org> 
> wrote:
> > +int drm_mode_getplane(struct drm_device *dev, void *data,
> > +                   struct drm_file *file_priv)
> > +{
> > +   struct drm_mode_get_plane *plane_resp = data;
> > +   struct drm_mode_object *obj;
> > +   struct drm_plane *plane;
> > +   uint32_t __user *format_ptr;
> > +   int ret = 0;
> > +
> > +   if (!drm_core_check_feature(dev, DRIVER_MODESET))
> > +           return -EINVAL;
> > +
> > +   mutex_lock(&dev->mode_config.mutex);
> > +   obj = drm_mode_object_find(dev, plane_resp->plane_id,
> > +                              DRM_MODE_OBJECT_PLANE);
> > +   if (!obj) {
> > +           ret = -EINVAL;
> > +           goto out;
> > +   }
> We had begun to use ENOENT for failure to find the specified object to
> give a little variation to our error codes. Still not very widespread,
> but I think a good practice to encourage :)

Ok both good comments; fixed in the latest update.

-- 
Jesse Barnes, Intel Open Source Technology Center

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to