diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-16 10:31:18 -0500 |
---|---|---|
committer | <jejb@mulgrave.il.steeleye.com> | 2006-02-27 23:55:02 -0500 |
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, | |||
241 | buf_needed = (buf_needed + 511) & ~511; | 241 | buf_needed = (buf_needed + 511) & ~511; |
242 | if (buf_needed > MAX_BUF) | 242 | if (buf_needed > MAX_BUF) |
243 | buf_needed = MAX_BUF; | 243 | buf_needed = MAX_BUF; |
244 | buf = kmalloc(buf_needed, gfp_mask); | 244 | buf = kzalloc(buf_needed, gfp_mask); |
245 | if (!buf) | 245 | if (!buf) |
246 | return -ENOMEM; | 246 | return -ENOMEM; |
247 | memset(buf, 0, buf_needed); | ||
248 | if (inlen == 0) { | 247 | if (inlen == 0) { |
249 | data_direction = DMA_FROM_DEVICE; | 248 | data_direction = DMA_FROM_DEVICE; |
250 | } else if (outlen == 0 ) { | 249 | } else if (outlen == 0 ) { |