summaryrefslogtreecommitdiff
path: root/linux/drm_agpsupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_agpsupport.h')
-rw-r--r--linux/drm_agpsupport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index b070a59e6..dfd0d8fc2 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -77,7 +77,7 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
drm_device_t *dev = priv->dev;
int retcode;
- if (dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
+ if (!dev->agp|| dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
if ((retcode = drm_agp->acquire())) return retcode;
dev->agp->acquired = 1;
return 0;