summaryrefslogtreecommitdiffstats
path: root/drivers/staging/omapdrm
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2011-12-09 23:26:06 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-12 16:37:51 -0800
commitb369839b88d6ffd9ad5b4f9362d6bb09a0e16c10 (patch)
tree4d70a7b2aed7f0bd469ed237ed241c8a53a9c210 /drivers/staging/omapdrm
parent16772a495ab4ee2f99b3f0094907b00d263620de (diff)
downloadlinux-b369839b88d6ffd9ad5b4f9362d6bb09a0e16c10.tar.gz
linux-b369839b88d6ffd9ad5b4f9362d6bb09a0e16c10.tar.bz2
linux-b369839b88d6ffd9ad5b4f9362d6bb09a0e16c10.zip
staging: drm/omap: allocation fail check
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/omapdrm')
-rw-r--r--drivers/staging/omapdrm/omap_gem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c
index 1054da3b2d25..a451c572a59d 100644
--- a/drivers/staging/omapdrm/omap_gem.c
+++ b/drivers/staging/omapdrm/omap_gem.c
@@ -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++) {