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/char/monreader.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/char/monreader.c')
-rw-r--r-- | drivers/s390/char/monreader.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 5fd3ad867386..fb7bc9e5eebc 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
@@ -257,14 +257,13 @@ mon_alloc_mem(void) | |||
257 | int i,j; | 257 | int i,j; |
258 | struct mon_private *monpriv; | 258 | struct mon_private *monpriv; |
259 | 259 | ||
260 | monpriv = kmalloc(sizeof(struct mon_private), GFP_KERNEL); | 260 | monpriv = kzalloc(sizeof(struct mon_private), GFP_KERNEL); |
261 | if (!monpriv) { | 261 | if (!monpriv) { |
262 | P_ERROR("no memory for monpriv\n"); | 262 | P_ERROR("no memory for monpriv\n"); |
263 | return NULL; | 263 | return NULL; |
264 | } | 264 | } |
265 | memset(monpriv, 0, sizeof(struct mon_private)); | ||
266 | for (i = 0; i < MON_MSGLIM; i++) { | 265 | for (i = 0; i < MON_MSGLIM; i++) { |
267 | monpriv->msg_array[i] = kmalloc(sizeof(struct mon_msg), | 266 | monpriv->msg_array[i] = kzalloc(sizeof(struct mon_msg), |
268 | GFP_KERNEL); | 267 | GFP_KERNEL); |
269 | if (!monpriv->msg_array[i]) { | 268 | if (!monpriv->msg_array[i]) { |
270 | P_ERROR("open, no memory for msg_array\n"); | 269 | P_ERROR("open, no memory for msg_array\n"); |
@@ -272,7 +271,6 @@ mon_alloc_mem(void) | |||
272 | kfree(monpriv->msg_array[j]); | 271 | kfree(monpriv->msg_array[j]); |
273 | return NULL; | 272 | return NULL; |
274 | } | 273 | } |
275 | memset(monpriv->msg_array[i], 0, sizeof(struct mon_msg)); | ||
276 | } | 274 | } |
277 | return monpriv; | 275 | return monpriv; |
278 | } | 276 | } |