[SCSI] initialize shost_data to zero
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tue, 31 Jul 2007 23:40:27 +0000 (08:40 +0900)
committerJames Bottomley <jejb@mulgrave.localdomain>
Wed, 1 Aug 2007 13:51:32 +0000 (08:51 -0500)
It's better to initialize host->shost_data to zero like
target->starget_data and device->sdev_data.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/hosts.c

index bd8e7f323c69fcd607ba6124f7a83339809a8abd..96bc31266c98a258aefbcbd6ff54fde95f80a560 100644 (file)
@@ -220,7 +220,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
        get_device(&shost->shost_gendev);
 
        if (shost->transportt->host_size &&
-           (shost->shost_data = kmalloc(shost->transportt->host_size,
+           (shost->shost_data = kzalloc(shost->transportt->host_size,
                                         GFP_KERNEL)) == NULL)
                goto out_del_classdev;