diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-24 12:15:31 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 16:33:18 +0100 |
commit | 88abaab4f9b08381e30e737980a1c49d6b524dfc (patch) | |
tree | d33aa82674c00c37cd293c9e888cff785880ce5a /drivers/s390/cio/device_ops.c | |
parent | [PATCH] s390: kzalloc() conversion in arch/s390 (diff) | |
download | linux-88abaab4f9b08381e30e737980a1c49d6b524dfc.tar.xz linux-88abaab4f9b08381e30e737980a1c49d6b524dfc.zip |
[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/cio/device_ops.c')
-rw-r--r-- | drivers/s390/cio/device_ops.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 3a50b1903287..795abb5a65ba 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c @@ -359,10 +359,9 @@ read_dev_chars (struct ccw_device *cdev, void **buffer, int length) CIO_TRACE_EVENT (4, "rddevch"); CIO_TRACE_EVENT (4, sch->dev.bus_id); - rdc_ccw = kmalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); + rdc_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); if (!rdc_ccw) return -ENOMEM; - memset(rdc_ccw, 0, sizeof(struct ccw1)); rdc_ccw->cmd_code = CCW_CMD_RDC; rdc_ccw->count = length; rdc_ccw->flags = CCW_FLAG_SLI; @@ -426,16 +425,14 @@ read_conf_data_lpm (struct ccw_device *cdev, void **buffer, int *length, __u8 lp if (!ciw || ciw->cmd == 0) return -EOPNOTSUPP; - rcd_ccw = kmalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); + rcd_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); if (!rcd_ccw) return -ENOMEM; - memset(rcd_ccw, 0, sizeof(struct ccw1)); - rcd_buf = kmalloc(ciw->count, GFP_KERNEL | GFP_DMA); + rcd_buf = kzalloc(ciw->count, GFP_KERNEL | GFP_DMA); if (!rcd_buf) { kfree(rcd_ccw); return -ENOMEM; } - memset (rcd_buf, 0, ciw->count); rcd_ccw->cmd_code = ciw->cmd; rcd_ccw->cda = (__u32) __pa (rcd_buf); rcd_ccw->count = ciw->count; |