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.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.c')
-rw-r--r-- | drivers/scsi/scsi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index c551bb84dbfb..11b27ba0cd41 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -136,9 +136,8 @@ struct scsi_request *scsi_allocate_request(struct scsi_device *sdev, | |||
136 | const int size = offset + sizeof(struct request); | 136 | const int size = offset + sizeof(struct request); |
137 | struct scsi_request *sreq; | 137 | struct scsi_request *sreq; |
138 | 138 | ||
139 | sreq = kmalloc(size, gfp_mask); | 139 | sreq = kzalloc(size, gfp_mask); |
140 | if (likely(sreq != NULL)) { | 140 | if (likely(sreq != NULL)) { |
141 | memset(sreq, 0, size); | ||
142 | sreq->sr_request = (struct request *)(((char *)sreq) + offset); | 141 | sreq->sr_request = (struct request *)(((char *)sreq) + offset); |
143 | sreq->sr_device = sdev; | 142 | sreq->sr_device = sdev; |
144 | sreq->sr_host = sdev->host; | 143 | sreq->sr_host = sdev->host; |