Commit b369839b authored by Rob Clark's avatar Rob Clark Committed by Greg Kroah-Hartman

staging: drm/omap: allocation fail check

Signed-off-by: default avatarRob Clark <rob@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 16772a49
...@@ -1094,6 +1094,10 @@ void omap_gem_init(struct drm_device *dev) ...@@ -1094,6 +1094,10 @@ void omap_gem_init(struct drm_device *dev)
} }
usergart = kzalloc(3 * sizeof(*usergart), GFP_KERNEL); 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: */ /* reserve 4k aligned/wide regions for userspace mappings: */
for (i = 0; i < ARRAY_SIZE(fmts); i++) { for (i = 0; i < ARRAY_SIZE(fmts); i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment