mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
drm: proper fix for drm_context
Bad patch in last version Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
b5e9fc13dd
commit
1e7d51902a
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue