mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
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:
parent
16772a495a
commit
b369839b88
1 changed files with 4 additions and 0 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue