summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2004-02-28 11:52:19 +0000
committerMichel Daenzer <michel@daenzer.net>2004-02-28 11:52:19 +0000
commitb61f07def349644ec8077cb12b303d444e223c1b (patch)
tree5d7fa38406092aea7377612a32bf471686ee889c /linux
parentce21dca4aaecac73490f26491b8f06a74d0ee0f5 (diff)
More differentiated error codes for DRM(agp_acquire)
Obtained from: Linux kernel
Diffstat (limited to 'linux')
-rw-r--r--linux/drm_agpsupport.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index 0f281b573..f83651af8 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -104,7 +104,11 @@ 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;
#ifndef VMAP_4_ARGS
if ( dev->agp->cant_use_aperture )