X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fdrm%2Fdrm_agpsupport.h;h=2abb7fa017ece58089a19f6ae9f12485dc36c296;hb=eb643825dab24bf61fe40ea800c5be013315220d;hp=8b3439fac5bf198fd3d6a95646743fea416cfd33;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/drivers/char/drm/drm_agpsupport.h b/drivers/char/drm/drm_agpsupport.h index 8b3439fac..2abb7fa01 100644 --- a/drivers/char/drm/drm_agpsupport.h +++ b/drivers/char/drm/drm_agpsupport.h @@ -103,7 +103,13 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp, drm_device_t *dev = priv->dev; int retcode; - if (!dev->agp || dev->agp->acquired || !drm_agp->acquire) + if (!dev->agp) + return -ENODEV; + if (dev->agp->acquired) + return -EBUSY; + if (!drm_agp->acquire) + return -EINVAL; + if ( dev->agp->cant_use_aperture ) return -EINVAL; if ((retcode = drm_agp->acquire())) return retcode;