mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: takis@issaris.org (Panagiotis Issaris)
To: linux-kernel@vger.kernel.org
Subject: [PATCH] kernel: Replace kmalloc/memset with kzalloc.
Date: Wed,  9 Nov 2005 01:52:37 +0100 (CET)	[thread overview]
Message-ID: <20051109005237.48F8520A1A@localhost.localdomain> (raw)


Replace kmalloc/memset by kzalloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>

---

 kernel/kexec.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

applies-to: 7085a0d56a035f94f292df54c7fe19d822904cec
bc3653f82726b556fbb5c7958f82c5b1e99c2860
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 2c95848..94df70f 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -104,11 +104,10 @@ static int do_kimage_alloc(struct kimage
 
 	/* Allocate a controlling structure */
 	result = -ENOMEM;
-	image = kmalloc(sizeof(*image), GFP_KERNEL);
+	image = kzalloc(sizeof(*image), GFP_KERNEL);
 	if (!image)
 		goto out;
 
-	memset(image, 0, sizeof(*image));
 	image->head = 0;
 	image->entry = &image->head;
 	image->last_entry = &image->head;
---
0.99.9.GIT

                 reply	other threads:[~2005-11-09  0:53 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=20051109005237.48F8520A1A@localhost.localdomain \
    --to=takis@issaris.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®