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.c | |
parent | b9a33cebac70d6f67a769ce8d4078fee2b254ada (diff) | |
download | linux-24669f75a3231fa37444977c92d1f4838bec1233.tar.gz linux-24669f75a3231fa37444977c92d1f4838bec1233.tar.bz2 linux-24669f75a3231fa37444977c92d1f4838bec1233.zip |
[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, const int size = offset + sizeof(struct request); struct scsi_request *sreq; - sreq = kmalloc(size, gfp_mask); + sreq = kzalloc(size, gfp_mask); if (likely(sreq != NULL)) { - memset(sreq, 0, size); sreq->sr_request = (struct request *)(((char *)sreq) + offset); sreq->sr_device = sdev; sreq->sr_host = sdev->host; |