aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_class.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-24 06:15:31 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:18 -0500
commit88abaab4f9b08381e30e737980a1c49d6b524dfc (patch)
treed33aa82674c00c37cd293c9e888cff785880ce5a /drivers/s390/char/tape_class.c
parentfb630517f0d0736ea73af07d6b357be9ad67e6f1 (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/char/tape_class.c')
-rw-r--r--drivers/s390/char/tape_class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c
index b3569c82bb16..a5c68e60fcf4 100644
--- a/drivers/s390/char/tape_class.c
+++ b/drivers/s390/char/tape_class.c
@@ -44,11 +44,10 @@ struct tape_class_device *register_tape_dev(
44 int rc; 44 int rc;
45 char * s; 45 char * s;
46 46
47 tcd = kmalloc(sizeof(struct tape_class_device), GFP_KERNEL); 47 tcd = kzalloc(sizeof(struct tape_class_device), GFP_KERNEL);
48 if (!tcd) 48 if (!tcd)
49 return ERR_PTR(-ENOMEM); 49 return ERR_PTR(-ENOMEM);
50 50
51 memset(tcd, 0, sizeof(struct tape_class_device));
52 strncpy(tcd->device_name, device_name, TAPECLASS_NAME_LEN); 51 strncpy(tcd->device_name, device_name, TAPECLASS_NAME_LEN);
53 for (s = strchr(tcd->device_name, '/'); s; s = strchr(s, '/')) 52 for (s = strchr(tcd->device_name, '/'); s; s = strchr(s, '/'))
54 *s = '!'; 53 *s = '!';