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:
committed by
Greg Kroah-Hartman
parent
16772a495a
commit
b369839b88
@@ -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++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user