aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c3
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)
1517 "sd_attach\n")); 1517 "sd_attach\n"));
1518 1518
1519 error = -ENOMEM; 1519 error = -ENOMEM;
1520 sdkp = kmalloc(sizeof(*sdkp), GFP_KERNEL); 1520 sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL);
1521 if (!sdkp) 1521 if (!sdkp)
1522 goto out; 1522 goto out;
1523 1523
1524 memset (sdkp, 0, sizeof(*sdkp));
1525 kref_init(&sdkp->kref); 1524 kref_init(&sdkp->kref);
1526 1525
1527 gd = alloc_disk(16); 1526 gd = alloc_disk(16);