diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 01:53:40 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 01:53:40 -0500 |
commit | c8a4f06e4b27dba425ed49fa603d9257e4cd9ece (patch) | |
tree | e303035bfce92ce11306cea1f487513781ef7d06 /drivers/char/drm/drm_context.c | |
parent | 4ab432677957e0a064bba3690004d3244de8ad6c (diff) | |
parent | 5666c0947ede0432ba5148570aa66ffb9febff5b (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/char/drm/drm_context.c')
-rw-r--r-- | drivers/char/drm/drm_context.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index bdd168d88f4..bd958d69a2a 100644 --- a/drivers/char/drm/drm_context.c +++ b/drivers/char/drm/drm_context.c @@ -432,7 +432,10 @@ int drm_addctx(struct inode *inode, struct file *filp, if (ctx.handle != DRM_KERNEL_CONTEXT) { if (dev->driver->context_ctor) - 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; + } } ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST); |