[PATCH 16/23] i915_mem.c: drm_alloc + memset to drm_zalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Mariusz Kozlowski <[email protected]>

 drivers/char/drm/i915_mem.c | 9842 -> 9808 (-34 bytes)
 drivers/char/drm/i915_mem.o | 114556 -> 114464 (-92 bytes)

 drivers/char/drm/i915_mem.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/i915_mem.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/i915_mem.c
@@ -189,7 +189,7 @@ static int init_heap(struct mem_block **
 	if (!blocks)
 		return -ENOMEM;

-	*heap = drm_alloc(sizeof(**heap), DRM_MEM_BUFLISTS);
+	*heap = drm_zalloc(sizeof(**heap), DRM_MEM_BUFLISTS);
 	if (!*heap) {
 		drm_free(blocks, sizeof(*blocks), DRM_MEM_BUFLISTS);
 		return -ENOMEM;
@@ -200,7 +200,6 @@ static int init_heap(struct mem_block **
 	blocks->filp = NULL;
 	blocks->next = blocks->prev = *heap;

-	memset(*heap, 0, sizeof(**heap));
 	(*heap)->filp = (DRMFILE) - 1;
 	(*heap)->next = (*heap)->prev = blocks;
 	return 0;

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux