diff options
Diffstat (limited to 'arch/ia64/hp/common/sba_iommu.c')
-rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 14691cda05c3..ce49fe3a3b56 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -1672,15 +1672,13 @@ ioc_sac_init(struct ioc *ioc) | |||
1672 | * SAC (single address cycle) addressable, so allocate a | 1672 | * SAC (single address cycle) addressable, so allocate a |
1673 | * pseudo-device to enforce that. | 1673 | * pseudo-device to enforce that. |
1674 | */ | 1674 | */ |
1675 | sac = kmalloc(sizeof(*sac), GFP_KERNEL); | 1675 | sac = kzalloc(sizeof(*sac), GFP_KERNEL); |
1676 | if (!sac) | 1676 | if (!sac) |
1677 | panic(PFX "Couldn't allocate struct pci_dev"); | 1677 | panic(PFX "Couldn't allocate struct pci_dev"); |
1678 | memset(sac, 0, sizeof(*sac)); | ||
1679 | 1678 | ||
1680 | controller = kmalloc(sizeof(*controller), GFP_KERNEL); | 1679 | controller = kzalloc(sizeof(*controller), GFP_KERNEL); |
1681 | if (!controller) | 1680 | if (!controller) |
1682 | panic(PFX "Couldn't allocate struct pci_controller"); | 1681 | panic(PFX "Couldn't allocate struct pci_controller"); |
1683 | memset(controller, 0, sizeof(*controller)); | ||
1684 | 1682 | ||
1685 | controller->iommu = ioc; | 1683 | controller->iommu = ioc; |
1686 | sac->sysdata = controller; | 1684 | sac->sysdata = controller; |
@@ -1737,12 +1735,10 @@ ioc_init(u64 hpa, void *handle) | |||
1737 | struct ioc *ioc; | 1735 | struct ioc *ioc; |
1738 | struct ioc_iommu *info; | 1736 | struct ioc_iommu *info; |
1739 | 1737 | ||
1740 | ioc = kmalloc(sizeof(*ioc), GFP_KERNEL); | 1738 | ioc = kzalloc(sizeof(*ioc), GFP_KERNEL); |
1741 | if (!ioc) | 1739 | if (!ioc) |
1742 | return NULL; | 1740 | return NULL; |
1743 | 1741 | ||
1744 | memset(ioc, 0, sizeof(*ioc)); | ||
1745 | |||
1746 | ioc->next = ioc_list; | 1742 | ioc->next = ioc_list; |
1747 | ioc_list = ioc; | 1743 | ioc_list = ioc; |
1748 | 1744 | ||