drm: fix issue with contexts running out of RAM

Signed-off-by: Dave Airlie <airlied@linux.ie>

authored by Dave Airlie and committed by Dave Airlie b5e9fc13 f26c473c

+4
+4
drivers/char/drm/drm_context.c
··· 432 433 if (ctx.handle != DRM_KERNEL_CONTEXT) { 434 if (dev->driver->context_ctor) 435 dev->driver->context_ctor(dev, ctx.handle); 436 } 437
··· 432 433 if (ctx.handle != DRM_KERNEL_CONTEXT) { 434 if (dev->driver->context_ctor) 435 + if (dev->driver->context_ctor(dev, ctx.handle)) { 436 + DRM_DEBUG("Running out of ctxs or memory.\n"); 437 + return -ENOMEM; 438 + } 439 dev->driver->context_ctor(dev, ctx.handle); 440 } 441