summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds2011-12-07 17:20:01 +0100
committerLinus Torvalds2011-12-07 17:20:01 +0100
commit10ec5e6c0cfcc4289c0cb056cd330ad70ea39b7f (patch)
tree6967bfd9e2f3f26d150909c5cd1e6e9f31c7f335 /drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff)
parentvmwgfx: Use kcalloc instead of kzalloc to allocate array (diff)
downloadkernel-qcow2-linux-10ec5e6c0cfcc4289c0cb056cd330ad70ea39b7f.tar.gz
kernel-qcow2-linux-10ec5e6c0cfcc4289c0cb056cd330ad70ea39b7f.tar.xz
kernel-qcow2-linux-10ec5e6c0cfcc4289c0cb056cd330ad70ea39b7f.zip
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: vmwgfx: Use kcalloc instead of kzalloc to allocate array drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index 3f6343502d1f..5ff561d4e0b4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
@@ -140,7 +140,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
goto out_clips;
}
- clips = kzalloc(num_clips * sizeof(*clips), GFP_KERNEL);
+ clips = kcalloc(num_clips, sizeof(*clips), GFP_KERNEL);
if (clips == NULL) {
DRM_ERROR("Failed to allocate clip rect list.\n");
ret = -ENOMEM;
@@ -232,7 +232,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
goto out_clips;
}
- clips = kzalloc(num_clips * sizeof(*clips), GFP_KERNEL);
+ clips = kcalloc(num_clips, sizeof(*clips), GFP_KERNEL);
if (clips == NULL) {
DRM_ERROR("Failed to allocate clip rect list.\n");
ret = -ENOMEM;