[PATCH 07/23] drm_fops.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_fops.c | 11849 -> 11817 (-32 bytes)
 drivers/char/drm/drm_fops.o | 115963 -> 115177 (-786 bytes)

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

--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/drm_fops.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/drm_fops.c
@@ -236,11 +236,10 @@ static int drm_open_helper(struct inode

 	DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);

-	priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES);
+	priv = drm_zalloc(sizeof(*priv), DRM_MEM_FILES);
 	if (!priv)
 		return -ENOMEM;

-	memset(priv, 0, sizeof(*priv));
 	filp->private_data = priv;
 	priv->uid = current->euid;
 	priv->pid = current->pid;

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