[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>
This commit is contained in:
Jes Sorensen
2006-01-16 10:31:18 -05:00
committed by
parent b9a33cebac
commit 24669f75a3
15 changed files with 30 additions and 59 deletions

View File

@@ -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;