diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2005-09-13 01:25:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-13 08:22:27 -0700 |
commit | 4aed0644d684428e811bb6944f032b460a3ab165 (patch) | |
tree | 4b69f949865fec1c42f7d90fb4d459483c38df5f /drivers/base/map.c | |
parent | 299cc3c166f7a11f6cc3b66aafbaf75c2aa0e0e2 (diff) | |
download | op-kernel-dev-4aed0644d684428e811bb6944f032b460a3ab165.zip op-kernel-dev-4aed0644d684428e811bb6944f032b460a3ab165.tar.gz |
[PATCH] drivers/base/*: use kzalloc instead of kmalloc+memset
Fixes a bunch of memset bugs too.
Signed-off-by: Lion Vollnhals <webmaster@schiggl.de>
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/base/map.c')
-rw-r--r-- | drivers/base/map.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/map.c b/drivers/base/map.c index 2f455d8..b449dae 100644 --- a/drivers/base/map.c +++ b/drivers/base/map.c @@ -135,7 +135,7 @@ retry: struct kobj_map *kobj_map_init(kobj_probe_t *base_probe, struct semaphore *sem) { struct kobj_map *p = kmalloc(sizeof(struct kobj_map), GFP_KERNEL); - struct probe *base = kmalloc(sizeof(struct probe), GFP_KERNEL); + struct probe *base = kzalloc(sizeof(*base), GFP_KERNEL); int i; if ((p == NULL) || (base == NULL)) { @@ -144,7 +144,6 @@ struct kobj_map *kobj_map_init(kobj_probe_t *base_probe, struct semaphore *sem) return NULL; } - memset(base, 0, sizeof(struct probe)); base->dev = 1; base->range = ~0; base->get = base_probe; |