[SCSI] initialize shost_data to zero
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>
This commit is contained in:
committed by
James Bottomley
parent
159e36fe99
commit
c000c43cf1
@@ -220,7 +220,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
|
|||||||
get_device(&shost->shost_gendev);
|
get_device(&shost->shost_gendev);
|
||||||
|
|
||||||
if (shost->transportt->host_size &&
|
if (shost->transportt->host_size &&
|
||||||
(shost->shost_data = kmalloc(shost->transportt->host_size,
|
(shost->shost_data = kzalloc(shost->transportt->host_size,
|
||||||
GFP_KERNEL)) == NULL)
|
GFP_KERNEL)) == NULL)
|
||||||
goto out_del_classdev;
|
goto out_del_classdev;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user