diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-16 10:31:18 -0500 |
---|---|---|
committer | <jejb@mulgrave.il.steeleye.com> | 2006-02-27 22:55:02 -0600 |
commit | 24669f75a3231fa37444977c92d1f4838bec1233 (patch) | |
tree | 3b64076b7d031aa31b95caeb512fb7e68b5fd28f /drivers/scsi/scsi_ioctl.c | |
parent | b9a33cebac70d6f67a769ce8d4078fee2b254ada (diff) |
[SCSI] SCSI core kmalloc2kzalloc
Change the core SCSI code to use kzalloc rather than kmalloc+memset
where possible.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index 0bba7d8eebb0..36e930066649 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -241,10 +241,9 @@ int scsi_ioctl_send_command(struct scsi_device *sdev, buf_needed = (buf_needed + 511) & ~511; if (buf_needed > MAX_BUF) buf_needed = MAX_BUF; - buf = kmalloc(buf_needed, gfp_mask); + buf = kzalloc(buf_needed, gfp_mask); if (!buf) return -ENOMEM; - memset(buf, 0, buf_needed); if (inlen == 0) { data_direction = DMA_FROM_DEVICE; } else if (outlen == 0 ) { |