diff options
author | Yijing Wang <wangyijing@huawei.com> | 2013-05-27 22:55:09 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-05-28 13:09:16 -0400 |
commit | ea221e64140f6fa543c29e31349001167b9f8ad0 (patch) | |
tree | d1540937f902e3383e7ecba615ed0e9efcb7e080 /arch/x86 | |
parent | bb5c2de268f0d01fb3bb7683037d9b2bebcba3d5 (diff) |
x86/PCI: Increase info->res_num before checking pci_use_crs
We should increase info->res_num before we checking pci_use_crs return
when pci=nocrs set.
No functional change, since we don't use res_num and res_offset[]
in the "!pci_use_crs" case anyway, but this makes the code read better.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Feng Tang <feng.tang@intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/pci/acpi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 3e724256dbee..d641897a1f4e 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -324,14 +324,11 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
324 | res->start = start; | 324 | res->start = start; |
325 | res->end = end; | 325 | res->end = end; |
326 | info->res_offset[info->res_num] = addr.translation_offset; | 326 | info->res_offset[info->res_num] = addr.translation_offset; |
327 | info->res_num++; | ||
327 | 328 | ||
328 | if (!pci_use_crs) { | 329 | if (!pci_use_crs) |
329 | dev_printk(KERN_DEBUG, &info->bridge->dev, | 330 | dev_printk(KERN_DEBUG, &info->bridge->dev, |
330 | "host bridge window %pR (ignored)\n", res); | 331 | "host bridge window %pR (ignored)\n", res); |
331 | return AE_OK; | ||
332 | } | ||
333 | |||
334 | info->res_num++; | ||
335 | 332 | ||
336 | return AE_OK; | 333 | return AE_OK; |
337 | } | 334 | } |