summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2011-07-25 17:12:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 20:57:13 -0700
commitf35119d6681300ba6d76da53cb1ebc2eed62e77a (patch)
tree0dfd0d1bf9acf3e48791059b50bc68fff01c4db9 /drivers/gpu/drm/radeon
parentf1c93e4946ae1cc268729451de6335a7e7d2bea9 (diff)
drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: David Airlie <airlied@linux.ie> Cc: Tejun Heo <tj@kernel.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_mem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mem.c b/drivers/gpu/drm/radeon/radeon_mem.c
index ed95155c4b1..988548efea9 100644
--- a/drivers/gpu/drm/radeon/radeon_mem.c
+++ b/drivers/gpu/drm/radeon/radeon_mem.c
@@ -139,7 +139,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
if (!blocks)
return -ENOMEM;
- *heap = kmalloc(sizeof(**heap), GFP_KERNEL);
+ *heap = kzalloc(sizeof(**heap), GFP_KERNEL);
if (!*heap) {
kfree(blocks);
return -ENOMEM;
@@ -150,7 +150,6 @@ static int init_heap(struct mem_block **heap, int start, int size)
blocks->file_priv = NULL;
blocks->next = blocks->prev = *heap;
- memset(*heap, 0, sizeof(**heap));
(*heap)->file_priv = (struct drm_file *) - 1;
(*heap)->next = (*heap)->prev = blocks;
return 0;