提交 1e7d5190 编写于 作者: D Dave Airlie 提交者: Dave Airlie

drm: proper fix for drm_context

Bad patch in last version
Signed-off-by: NDave Airlie <airlied@linux.ie>
上级 b5e9fc13
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册