diff options
-rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 10 | ||||
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 3 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 3 |
4 files changed, 6 insertions, 13 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 | ||
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index b62f0c4d2c7c..1f16ebb9a800 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -684,12 +684,11 @@ static int get_async_struct(int line, struct async_struct **ret_info) | |||
684 | *ret_info = sstate->info; | 684 | *ret_info = sstate->info; |
685 | return 0; | 685 | return 0; |
686 | } | 686 | } |
687 | info = kmalloc(sizeof(struct async_struct), GFP_KERNEL); | 687 | info = kzalloc(sizeof(struct async_struct), GFP_KERNEL); |
688 | if (!info) { | 688 | if (!info) { |
689 | sstate->count--; | 689 | sstate->count--; |
690 | return -ENOMEM; | 690 | return -ENOMEM; |
691 | } | 691 | } |
692 | memset(info, 0, sizeof(struct async_struct)); | ||
693 | init_waitqueue_head(&info->open_wait); | 692 | init_waitqueue_head(&info->open_wait); |
694 | init_waitqueue_head(&info->close_wait); | 693 | init_waitqueue_head(&info->close_wait); |
695 | init_waitqueue_head(&info->delta_msr_wait); | 694 | init_waitqueue_head(&info->delta_msr_wait); |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 3aaede0d6981..fa4a1a7eb67d 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -853,9 +853,8 @@ pfm_context_alloc(void) | |||
853 | * allocate context descriptor | 853 | * allocate context descriptor |
854 | * must be able to free with interrupts disabled | 854 | * must be able to free with interrupts disabled |
855 | */ | 855 | */ |
856 | ctx = kmalloc(sizeof(pfm_context_t), GFP_KERNEL); | 856 | ctx = kzalloc(sizeof(pfm_context_t), GFP_KERNEL); |
857 | if (ctx) { | 857 | if (ctx) { |
858 | memset(ctx, 0, sizeof(pfm_context_t)); | ||
859 | DPRINT(("alloc ctx @%p\n", ctx)); | 858 | DPRINT(("alloc ctx @%p\n", ctx)); |
860 | } | 859 | } |
861 | return ctx; | 860 | return ctx; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index eb92cef9cd0d..474d179966dc 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -125,11 +125,10 @@ alloc_pci_controller (int seg) | |||
125 | { | 125 | { |
126 | struct pci_controller *controller; | 126 | struct pci_controller *controller; |
127 | 127 | ||
128 | controller = kmalloc(sizeof(*controller), GFP_KERNEL); | 128 | controller = kzalloc(sizeof(*controller), GFP_KERNEL); |
129 | if (!controller) | 129 | if (!controller) |
130 | return NULL; | 130 | return NULL; |
131 | 131 | ||
132 | memset(controller, 0, sizeof(*controller)); | ||
133 | controller->segment = seg; | 132 | controller->segment = seg; |
134 | controller->node = -1; | 133 | controller->node = -1; |
135 | return controller; | 134 | return controller; |