diff options
Diffstat (limited to 'arch/arm/mach-ixp4xx/common-pci.c')
| -rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 6e3462ed5306..2d40fe1145f0 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
| @@ -463,7 +463,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
| 463 | if (nr >= 1) | 463 | if (nr >= 1) |
| 464 | return 0; | 464 | return 0; |
| 465 | 465 | ||
| 466 | res = kmalloc(sizeof(*res) * 2, GFP_KERNEL); | 466 | res = kzalloc(sizeof(*res) * 2, GFP_KERNEL); |
| 467 | if (res == NULL) { | 467 | if (res == NULL) { |
| 468 | /* | 468 | /* |
| 469 | * If we're out of memory this early, something is wrong, | 469 | * If we're out of memory this early, something is wrong, |
| @@ -471,7 +471,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
| 471 | */ | 471 | */ |
| 472 | panic("PCI: unable to allocate resources?\n"); | 472 | panic("PCI: unable to allocate resources?\n"); |
| 473 | } | 473 | } |
| 474 | memset(res, 0, sizeof(*res) * 2); | ||
| 475 | 474 | ||
| 476 | local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | 475 | local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); |
| 477 | 476 | ||
