Commit 1e7d5190 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

drm: proper fix for drm_context



Bad patch in last version

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent b5e9fc13
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);