diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-10-03 15:17:13 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-10-03 22:02:57 +0300 |
commit | a06876a766c27dcedf17a0f60be89609ee23d861 (patch) | |
tree | ca1ba15be894bdcb506991f8bc8de0d3fe5eeb40 /drivers/ide/ide-scan-pci.c | |
parent | d410a6417e5e4deb4a9c34164addcebebc9099c9 (diff) | |
download | linux-a06876a766c27dcedf17a0f60be89609ee23d861.tar.xz |
ide: pci: free PCI BARs on initialization failure
Recent pci_assign_irq() changes uncovered a problem with missing freeing of
PCI BARs on PCI IDE host initialization failure:
ide0: disabled, no IRQ
ide0: failed to initialize IDE interface
ide0: disabling port
cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07)
CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io 0x8050-0x8057]
cmd64x 0000:00:02.0: can't reserve resources
CMD64x_IDE: probe of 0000:00:02.0 failed with error -16
Fix the problem by adding missing freeing of PCI BARs to
ide_setup_pci_controller() and ide_pci_init_two().
Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()")
Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.net
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
[bhelgaas: add Fixes:]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'drivers/ide/ide-scan-pci.c')
0 files changed, 0 insertions, 0 deletions