public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yan Burman <burman.yan@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jdike@karaya.com, trivial@kernel.org
Subject: [PATCH 2.6.19-rc6] um: replace kmalloc+memset with kzalloc
Date: Fri, 24 Nov 2006 13:57:24 +0200	[thread overview]
Message-ID: <4566DE24.5070108@gmail.com> (raw)

Replace kmalloc+memset with kzalloc 

Signed-off-by: Yan Burman <burman.yan@gmail.com>

diff -rubp linux-2.6.19-rc5_orig/arch/um/drivers/net_kern.c linux-2.6.19-rc5_kzalloc/arch/um/drivers/net_kern.c
--- linux-2.6.19-rc5_orig/arch/um/drivers/net_kern.c	2006-11-09 12:16:22.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/arch/um/drivers/net_kern.c	2006-11-11 22:44:04.000000000 +0200
@@ -333,13 +333,12 @@ static int eth_configure(int n, void *in
 	size = transport->private_size + sizeof(struct uml_net_private) + 
 		sizeof(((struct uml_net_private *) 0)->user);
 
-	device = kmalloc(sizeof(*device), GFP_KERNEL);
+	device = kzalloc(sizeof(*device), GFP_KERNEL);
 	if (device == NULL) {
 		printk(KERN_ERR "eth_configure failed to allocate uml_net\n");
 		return(1);
 	}
 
-	memset(device, 0, sizeof(*device));
 	INIT_LIST_HEAD(&device->list);
 	device->index = n;
 


Regards
Yan Burman

                 reply	other threads:[~2006-11-24 12:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4566DE24.5070108@gmail.com \
    --to=burman.yan@gmail.com \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox