Skip to content

Commit

Permalink
PCI: pciehp: Drop pointless label from pciehp_probe()
Browse files Browse the repository at this point in the history
The err_out_none label in pciehp_probe() only leads to a return statement,
so use return statements instead of jumps to it and drop it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Rafael J. Wysocki authored and Bjorn Helgaas committed May 22, 2015
1 parent e705c29 commit 2af31f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pci/hotplug/pciehp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ static int pciehp_probe(struct pcie_device *dev)
/* Can happen if we run out of bus numbers during probe */
dev_err(&dev->device,
"Hotplug bridge without secondary bus, ignoring\n");
goto err_out_none;
return -ENODEV;
}

ctrl = pcie_init(dev);
if (!ctrl) {
dev_err(&dev->device, "Controller initialization failed\n");
goto err_out_none;
return -ENODEV;
}
set_service_data(dev, ctrl);

Expand Down Expand Up @@ -302,7 +302,6 @@ static int pciehp_probe(struct pcie_device *dev)
cleanup_slot(ctrl);
err_out_release_ctlr:
pciehp_release_ctrl(ctrl);
err_out_none:
return -ENODEV;
}

Expand Down

0 comments on commit 2af31f4

Please sign in to comment.