summaryrefslogtreecommitdiffstats
path: root/drivers/eisa
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-11-07 01:01:23 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:59 -0800
commit8ac5436ced2fd4eab3abe7cbc6d5a29881fa9ccb (patch)
treebed9b23d965120597cd16461b1502c07a24c0a9c /drivers/eisa
parente66860cbda4a1880fa379bee17d6ab926e5cc58e (diff)
downloadlinux-8ac5436ced2fd4eab3abe7cbc6d5a29881fa9ccb.tar.bz2
[PATCH] drivers/eisa: 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/eisa')
-rw-r--r--drivers/eisa/eisa-bus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c
index 1937743c8e29..4196137e66de 100644
--- a/drivers/eisa/eisa-bus.c
+++ b/drivers/eisa/eisa-bus.c
@@ -281,13 +281,11 @@ static int __init eisa_probe (struct eisa_root_device *root)
/* First try to get hold of slot 0. If there is no device
* here, simply fail, unless root->force_probe is set. */
- if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) {
+ if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) {
printk (KERN_ERR "EISA: Couldn't allocate mainboard slot\n");
return -ENOMEM;
}
- memset (edev, 0, sizeof (*edev));
-
if (eisa_request_resources (root, edev, 0)) {
printk (KERN_WARNING \
"EISA: Cannot allocate resource for mainboard\n");
@@ -317,13 +315,11 @@ static int __init eisa_probe (struct eisa_root_device *root)
force_probe:
for (c = 0, i = 1; i <= root->slots; i++) {
- if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) {
+ if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) {
printk (KERN_ERR "EISA: Out of memory for slot %d\n",
i);
continue;
}
-
- memset (edev, 0, sizeof (*edev));
if (eisa_request_resources (root, edev, i)) {
printk (KERN_WARNING \