summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-01-16 18:31:18 +0300
committer <jejb@mulgrave.il.steeleye.com>2006-02-28 07:55:02 +0300
commit24669f75a3231fa37444977c92d1f4838bec1233 (patch)
tree3b64076b7d031aa31b95caeb512fb7e68b5fd28f /drivers/scsi/scsi_ioctl.c
parentb9a33cebac70d6f67a769ce8d4078fee2b254ada (diff)
downloadlinux-24669f75a3231fa37444977c92d1f4838bec1233.tar.xz
[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.c3
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 ) {