[PATCH 13/23] i830_dma.c: drm_alloc + memset to drm_zalloc

From: m . kozlowski
Date: Mon Aug 27 2007 - 17:19:45 EST


Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>

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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/