diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-24 06:15:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:18 -0500 |
commit | 88abaab4f9b08381e30e737980a1c49d6b524dfc (patch) | |
tree | d33aa82674c00c37cd293c9e888cff785880ce5a /drivers/s390/s390_rdev.c | |
parent | fb630517f0d0736ea73af07d6b357be9ad67e6f1 (diff) |
[PATCH] s390: kzalloc() conversion in drivers/s390
Convert all kmalloc + memset sequences in drivers/s390 to kzalloc usage.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/s390_rdev.c')
-rw-r--r-- | drivers/s390/s390_rdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/s390_rdev.c b/drivers/s390/s390_rdev.c index e3f647169827..3c7145d9f9a1 100644 --- a/drivers/s390/s390_rdev.c +++ b/drivers/s390/s390_rdev.c | |||
@@ -27,10 +27,9 @@ s390_root_dev_register(const char *name) | |||
27 | 27 | ||
28 | if (!strlen(name)) | 28 | if (!strlen(name)) |
29 | return ERR_PTR(-EINVAL); | 29 | return ERR_PTR(-EINVAL); |
30 | dev = kmalloc(sizeof(struct device), GFP_KERNEL); | 30 | dev = kzalloc(sizeof(struct device), GFP_KERNEL); |
31 | if (!dev) | 31 | if (!dev) |
32 | return ERR_PTR(-ENOMEM); | 32 | return ERR_PTR(-ENOMEM); |
33 | memset(dev, 0, sizeof(struct device)); | ||
34 | strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE)); | 33 | strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE)); |
35 | dev->release = s390_root_dev_release; | 34 | dev->release = s390_root_dev_release; |
36 | ret = device_register(dev); | 35 | ret = device_register(dev); |