Message ID | 1370636966-2335-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index ccd0ab3..f24ba14 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -618,7 +618,9 @@ int pcibios_add_device(struct pci_dev *dev) pa_data = boot_params.hdr.setup_data; while (pa_data) { - data = phys_to_virt(pa_data); + data = ioremap(pa_data, sizeof(*rom)); + if (!data) + return -ENOMEM; if (data->type == SETUP_PCI) { rom = (struct pci_setup_rom *)data; @@ -635,6 +637,7 @@ int pcibios_add_device(struct pci_dev *dev) } } pa_data = data->next; + iounmap(data); } return 0; }