diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-16 18:31:18 +0300 |
---|---|---|
committer | <jejb@mulgrave.il.steeleye.com> | 2006-02-28 07:55:02 +0300 |
commit | 24669f75a3231fa37444977c92d1f4838bec1233 (patch) | |
tree | 3b64076b7d031aa31b95caeb512fb7e68b5fd28f /drivers/scsi/sd.c | |
parent | b9a33cebac70d6f67a769ce8d4078fee2b254ada (diff) | |
download | linux-24669f75a3231fa37444977c92d1f4838bec1233.tar.xz |
[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/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9d9872347f56..8ba2d988d051 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1517,11 +1517,10 @@ static int sd_probe(struct device *dev) "sd_attach\n")); error = -ENOMEM; - sdkp = kmalloc(sizeof(*sdkp), GFP_KERNEL); + sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL); if (!sdkp) goto out; - memset (sdkp, 0, sizeof(*sdkp)); kref_init(&sdkp->kref); gd = alloc_disk(16); |