summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-01-16 10:31:18 -0500
committer <jejb@mulgrave.il.steeleye.com>2006-02-27 22:55:02 -0600
commit24669f75a3231fa37444977c92d1f4838bec1233 (patch)
tree3b64076b7d031aa31b95caeb512fb7e68b5fd28f /drivers/scsi/sr.c
parentb9a33cebac70d6f67a769ce8d4078fee2b254ada (diff)
downloadop-kernel-dev-24669f75a3231fa37444977c92d1f4838bec1233.zip
op-kernel-dev-24669f75a3231fa37444977c92d1f4838bec1233.tar.gz
[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/sr.c')
-rw-r--r--drivers/scsi/sr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 997f8e3..d8d12a1 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -525,10 +525,9 @@ static int sr_probe(struct device *dev)
goto fail;
error = -ENOMEM;
- cd = kmalloc(sizeof(*cd), GFP_KERNEL);
+ cd = kzalloc(sizeof(*cd), GFP_KERNEL);
if (!cd)
goto fail;
- memset(cd, 0, sizeof(*cd));
kref_init(&cd->kref);
OpenPOWER on IntegriCloud