diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-02 03:23:44 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-02 03:23:44 -0500 |
commit | b5e9fc13dd0f25a2f422000c185f491bfd4f7335 (patch) | |
tree | 217927d6c812fbe99706a3a986acf98899231835 /drivers | |
parent | f26c473cdf557ea6e8f267d34eee82d30473a363 (diff) |
drm: fix issue with contexts running out of RAM
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/drm/drm_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index bdd168d88f49..7a7bcef2aa84 100644 --- a/drivers/char/drm/drm_context.c +++ b/drivers/char/drm/drm_context.c | |||
@@ -432,6 +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)) { | ||
436 | DRM_DEBUG("Running out of ctxs or memory.\n"); | ||
437 | return -ENOMEM; | ||
438 | } | ||
435 | dev->driver->context_ctor(dev, ctx.handle); | 439 | dev->driver->context_ctor(dev, ctx.handle); |
436 | } | 440 | } |
437 | 441 | ||