Skip to content

Commit

Permalink
[SCSI] initialize shost_data to zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Aug 1, 2007
1 parent 159e36f commit c000c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c000c43

Please sign in to comment.