[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
@@ -44,11 +44,10 @@ struct tape_class_device *register_tape_dev(
|
||||
int rc;
|
||||
char * s;
|
||||
|
||||
tcd = kmalloc(sizeof(struct tape_class_device), GFP_KERNEL);
|
||||
tcd = kzalloc(sizeof(struct tape_class_device), GFP_KERNEL);
|
||||
if (!tcd)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
memset(tcd, 0, sizeof(struct tape_class_device));
|
||||
strncpy(tcd->device_name, device_name, TAPECLASS_NAME_LEN);
|
||||
for (s = strchr(tcd->device_name, '/'); s; s = strchr(s, '/'))
|
||||
*s = '!';
|
||||
|
Reference in New Issue
Block a user