aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-01-02 19:25:35 +1100
committerDave Airlie <airlied@linux.ie>2006-01-02 19:25:35 +1100
commit1e7d51902a8bd08e37113aaf182d12233b157151 (patch)
tree830c01742cd9ea07a7b6809b342821a20b8f30ad /drivers/char/drm
parentb5e9fc13dd0f25a2f422000c185f491bfd4f7335 (diff)
drm: proper fix for drm_context
Bad patch in last version Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/drm_context.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c
index 7a7bcef2aa8..f8425452694 100644
--- a/drivers/char/drm/drm_context.c
+++ b/drivers/char/drm/drm_context.c
@@ -432,11 +432,10 @@ int drm_addctx(struct inode *inode, struct file *filp,
if (ctx.handle != DRM_KERNEL_CONTEXT) {
if (dev->driver->context_ctor)
- if (dev->driver->context_ctor(dev, ctx.handle)) {
+ if (!dev->driver->context_ctor(dev, ctx.handle)) {
DRM_DEBUG("Running out of ctxs or memory.\n");
return -ENOMEM;
}
- dev->driver->context_ctor(dev, ctx.handle);
}
ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST);