diff options
author | Kevin Hao <haokexin@gmail.com> | 2013-05-25 15:36:26 +0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-05-25 22:01:24 +0400 |
commit | 96ddef25b24a6159e78fb53c1b13336914ff1154 (patch) | |
tree | 5974722e8f6efe01f4b948d570c37e0073e1ff24 /drivers/pci/probe.c | |
parent | 33963e308e98064ce89d961ffeede2fb055f8ffc (diff) | |
download | linux-96ddef25b24a6159e78fb53c1b13336914ff1154.tar.xz |
PCI: Consolidate calls to pcibios_bus_to_resource() in __pci_read_base()
Since we will invoke pcibios_bus_to_resource() unconditionally if we
don't goto fail, move it out of if/else wrap. No function change.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d40cd05bbf64..cd7b6de9376c 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -250,12 +250,10 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, pci_write_config_dword(dev, pos + 4, 0); region.start = 0; region.end = sz64; - pcibios_bus_to_resource(dev, res, ®ion); bar_disabled = true; } else { region.start = l64; region.end = l64 + sz64; - pcibios_bus_to_resource(dev, res, ®ion); } } else { sz = pci_size(l, sz, mask); @@ -265,9 +263,10 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, region.start = l; region.end = l + sz; - pcibios_bus_to_resource(dev, res, ®ion); } + pcibios_bus_to_resource(dev, res, ®ion); + goto out; |