Skip to content

Commit

Permalink
staging: drm/omap: allocation fail check
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rob Clark authored and Greg Kroah-Hartman committed Dec 13, 2011
1 parent 16772a4 commit b369839
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/staging/omapdrm/omap_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit b369839

Please sign in to comment.