aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/pci/pcibr/pcibr_provider.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-02-24 14:05:47 +1100
committerPaul Mackerras <paulus@samba.org>2006-02-24 14:05:47 +1100
commita00428f5b149e36b8225b2a0812742a6dfb07b8c (patch)
treea78869cd67cf78a0eb091fb0ea5d397734bd6738 /arch/ia64/sn/pci/pcibr/pcibr_provider.c
parent774fee58c465ea1c7e9775e347ec307bcf2deeb3 (diff)
parentfb5c594c2acc441f0d2d8f457484a0e0e9285db3 (diff)
downloadlinux-a00428f5b149e36b8225b2a0812742a6dfb07b8c.tar.gz
Merge ../powerpc-merge
Diffstat (limited to 'arch/ia64/sn/pci/pcibr/pcibr_provider.c')
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 2fac27049bf62e..98f716bd92f0ce 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -163,9 +163,12 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
/* Setup the PMU ATE map */
soft->pbi_int_ate_resource.lowest_free_index = 0;
soft->pbi_int_ate_resource.ate =
- kmalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL);
- memset(soft->pbi_int_ate_resource.ate, 0,
- (soft->pbi_int_ate_size * sizeof(u64)));
+ kzalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL);
+
+ if (!soft->pbi_int_ate_resource.ate) {
+ kfree(soft);
+ return NULL;
+ }
if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) {
/* TIO PCI Bridge: find nearest node with CPUs */