PCI: designware: Simplify host bridge window iteration
authorBjorn Helgaas <bhelgaas@google.com>
Sat, 28 May 2016 23:48:11 +0000 (18:48 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 20 Jun 2016 19:06:05 +0000 (14:06 -0500)
The switch is the only statement in the resource_list_for_each_entry()
loop, so remove unnecessary "continue" statements in the switch.

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-designware.c

index 8304aeba4fb59ca198d295f25f0f4ed69f12212c..12afce19890b747ae5cc42f00541a9b79884c312 100644 (file)
@@ -465,11 +465,9 @@ int dw_pcie_host_init(struct pcie_port *pp)
                        pp->io_size = resource_size(pp->io);
                        pp->io_bus_addr = pp->io->start - win->offset;
                        ret = pci_remap_iospace(pp->io, pp->io_base);
-                       if (ret) {
+                       if (ret)
                                dev_warn(pp->dev, "error %d: failed to map resource %pR\n",
                                         ret, pp->io);
-                               continue;
-                       }
                        break;
                case IORESOURCE_MEM:
                        pp->mem = win->res;
@@ -487,8 +485,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
                case IORESOURCE_BUS:
                        pp->busn = win->res;
                        break;
-               default:
-                       continue;
                }
        }