From: Dave Airlie Date: Mon, 2 Jan 2006 08:25:35 +0000 (+1100) Subject: drm: proper fix for drm_context X-Git-Tag: v2.6.16-rc1~178^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e7d51902a8bd08e37113aaf182d12233b157151;p=linux-2.6 drm: proper fix for drm_context Bad patch in last version Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index 7a7bcef2aa..f842545269 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);