staging: drm/omap: allocation fail check

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Rob Clark 2011-12-09 23:26:06 -06:00 committed by Greg Kroah-Hartman
parent 16772a495a
commit b369839b88

View File

@ -1094,6 +1094,10 @@ void omap_gem_init(struct drm_device *dev)
}
usergart = kzalloc(3 * sizeof(*usergart), GFP_KERNEL);
if (!usergart) {
dev_warn(dev->dev, "could not allocate usergart\n");
return;
}
/* reserve 4k aligned/wide regions for userspace mappings: */
for (i = 0; i < ARRAY_SIZE(fmts); i++) {