summaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ide-cs.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-11-07 10:01:25 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 16:54:00 +0100
commitf5e3c2faa20615e900ab26bd957f898400435924 (patch)
treed3dd4c93539f155e3fd4ef18ae9cfe482ed1b340 /drivers/ide/legacy/ide-cs.c
parent[PATCH] drivers/firmware: kmalloc + memset -> kzalloc conversion (diff)
downloadlinux-f5e3c2faa20615e900ab26bd957f898400435924.tar.xz
linux-f5e3c2faa20615e900ab26bd957f898400435924.zip
[PATCH] ide: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/legacy/ide-cs.c')
-rw-r--r--drivers/ide/legacy/ide-cs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index a35a58bef1a4..1dafffa7e513 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -116,9 +116,8 @@ static dev_link_t *ide_attach(void)
DEBUG(0, "ide_attach()\n");
/* Create new ide device */
- info = kmalloc(sizeof(*info), GFP_KERNEL);
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) return NULL;
- memset(info, 0, sizeof(*info));
link = &info->link; link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -221,9 +220,8 @@ static void ide_config(dev_link_t *link)
DEBUG(0, "ide_config(0x%p)\n", link);
- stk = kmalloc(sizeof(*stk), GFP_KERNEL);
+ stk = kzalloc(sizeof(*stk), GFP_KERNEL);
if (!stk) goto err_mem;
- memset(stk, 0, sizeof(*stk));
cfg = &stk->parse.cftable_entry;
tuple.TupleData = (cisdata_t *)&stk->buf;