aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
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 997f8e30509b..d8d12a1718bf 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -525,10 +525,9 @@ static int sr_probe(struct device *dev)
525 goto fail; 525 goto fail;
526 526
527 error = -ENOMEM; 527 error = -ENOMEM;
528 cd = kmalloc(sizeof(*cd), GFP_KERNEL); 528 cd = kzalloc(sizeof(*cd), GFP_KERNEL);
529 if (!cd) 529 if (!cd)
530 goto fail; 530 goto fail;
531 memset(cd, 0, sizeof(*cd));
532 531
533 kref_init(&cd->kref); 532 kref_init(&cd->kref);
534 533