mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 19:14:01 +08:00
drm/vmwgfx: use kzalloc in vmw_surface_define_ioctl()
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-7-git-send-email-boris.brezillon@free-electrons.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
07a6dc19a3
commit
9e266128fc
@ -815,11 +815,8 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
|
||||
srf->sizes[0].height == 64 &&
|
||||
srf->format == SVGA3D_A8R8G8B8) {
|
||||
|
||||
srf->snooper.image = kmalloc(64 * 64 * 4, GFP_KERNEL);
|
||||
/* clear the image */
|
||||
if (srf->snooper.image) {
|
||||
memset(srf->snooper.image, 0x00, 64 * 64 * 4);
|
||||
} else {
|
||||
srf->snooper.image = kzalloc(64 * 64 * 4, GFP_KERNEL);
|
||||
if (!srf->snooper.image) {
|
||||
DRM_ERROR("Failed to allocate cursor_image\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_no_copy;
|
||||
|
Loading…
Reference in New Issue
Block a user