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/hosts.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/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 588107923499..ef57f253031c 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -306,10 +306,9 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
306 | dump_stack(); | 306 | dump_stack(); |
307 | } | 307 | } |
308 | 308 | ||
309 | shost = kmalloc(sizeof(struct Scsi_Host) + privsize, gfp_mask); | 309 | shost = kzalloc(sizeof(struct Scsi_Host) + privsize, gfp_mask); |
310 | if (!shost) | 310 | if (!shost) |
311 | return NULL; | 311 | return NULL; |
312 | memset(shost, 0, sizeof(struct Scsi_Host) + privsize); | ||
313 | 312 | ||
314 | spin_lock_init(&shost->default_lock); | 313 | spin_lock_init(&shost->default_lock); |
315 | scsi_assign_lock(shost, &shost->default_lock); | 314 | scsi_assign_lock(shost, &shost->default_lock); |