diff options
| author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-02 03:25:35 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2006-01-02 03:25:35 -0500 |
| commit | 1e7d51902a8bd08e37113aaf182d12233b157151 (patch) | |
| tree | 830c01742cd9ea07a7b6809b342821a20b8f30ad | |
| parent | b5e9fc13dd0f25a2f422000c185f491bfd4f7335 (diff) | |
drm: proper fix for drm_context
Bad patch in last version
Signed-off-by: Dave Airlie <airlied@linux.ie>
| -rw-r--r-- | drivers/char/drm/drm_context.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index 7a7bcef2aa84..f84254526949 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, | |||
| 432 | 432 | ||
| 433 | if (ctx.handle != DRM_KERNEL_CONTEXT) { | 433 | if (ctx.handle != DRM_KERNEL_CONTEXT) { |
| 434 | if (dev->driver->context_ctor) | 434 | if (dev->driver->context_ctor) |
| 435 | if (dev->driver->context_ctor(dev, ctx.handle)) { | 435 | if (!dev->driver->context_ctor(dev, ctx.handle)) { |
| 436 | DRM_DEBUG("Running out of ctxs or memory.\n"); | 436 | DRM_DEBUG("Running out of ctxs or memory.\n"); |
| 437 | return -ENOMEM; | 437 | return -ENOMEM; |
| 438 | } | 438 | } |
| 439 | dev->driver->context_ctor(dev, ctx.handle); | ||
| 440 | } | 439 | } |
| 441 | 440 | ||
| 442 | ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST); | 441 | ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST); |
