diff options
Diffstat (limited to 'drivers')
-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, 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); |