[PATCH 03/23] drm_auth.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/drm_auth.c | 5835 -> 5802 (-33 bytes)
 drivers/char/drm/drm_auth.o | 104968 -> 104860 (-108 bytes)

 drivers/char/drm/drm_auth.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/drm_auth.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/drm_auth.c
@@ -78,12 +78,11 @@ static int drm_add_magic(struct drm_devi

 	DRM_DEBUG("%d\n", magic);

-	entry = drm_alloc(sizeof(*entry), DRM_MEM_MAGIC);
+	entry = drm_zalloc(sizeof(*entry), DRM_MEM_MAGIC);
 	if (!entry)
 		return -ENOMEM;
-	memset(entry, 0, sizeof(*entry));
-	entry->priv = priv;

+	entry->priv = priv;
 	entry->hash_item.key = (unsigned long)magic;
 	mutex_lock(&dev->struct_mutex);
 	drm_ht_insert_item(&dev->magiclist, &entry->hash_item);

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