[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>
This commit is contained in:

committed by
Linus Torvalds

parent
fb630517f0
commit
88abaab4f9
@@ -27,10 +27,9 @@ s390_root_dev_register(const char *name)
|
||||
|
||||
if (!strlen(name))
|
||||
return ERR_PTR(-EINVAL);
|
||||
dev = kmalloc(sizeof(struct device), GFP_KERNEL);
|
||||
dev = kzalloc(sizeof(struct device), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
memset(dev, 0, sizeof(struct device));
|
||||
strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE));
|
||||
dev->release = s390_root_dev_release;
|
||||
ret = device_register(dev);
|
||||
|
Reference in New Issue
Block a user