[PATCH 13/23] i830_dma.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/i830_dma.c | 41269 -> 41212 (-57 bytes)
 drivers/char/drm/i830_dma.o | 157920 -> 157480 (-440 bytes)

 drivers/char/drm/i830_dma.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/i830_dma.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/i830_dma.c
@@ -336,8 +336,6 @@ static int i830_dma_initialize(struct dr
 {
 	struct drm_map_list *r_list;

-	memset(dev_priv, 0, sizeof(drm_i830_private_t));
-
 	list_for_each_entry(r_list, &dev->maplist, head) {
 		if (r_list->map &&
 		    r_list->map->type == _DRM_SHM &&
@@ -465,9 +463,9 @@ static int i830_dma_init(struct inode *i

 	switch (init.func) {
 	case I830_INIT_DMA:
-		dev_priv = drm_alloc(sizeof(drm_i830_private_t),
+		dev_priv = drm_zalloc(sizeof(drm_i830_private_t),
 				     DRM_MEM_DRIVER);
-		if (dev_priv == NULL)
+		if (!dev_priv)
 			return -ENOMEM;
 		retcode = i830_dma_initialize(dev, dev_priv, &init);
 		break;

--
-
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