All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCIe / hotplug: Drop pointless label from pciehp_probe()
@ 2015-05-22 22:38 Rafael J. Wysocki
  2015-05-22 22:39 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2015-05-22 22:38 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Linux PCI, Linux Kernel Mailing List

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---

On top of https://patchwork.kernel.org/patch/6436921/ .

---
 drivers/pci/hotplug/pciehp_core.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-pm/drivers/pci/hotplug/pciehp_core.c
===================================================================
--- linux-pm.orig/drivers/pci/hotplug/pciehp_core.c
+++ linux-pm/drivers/pci/hotplug/pciehp_core.c
@@ -256,13 +256,13 @@ static int pciehp_probe(struct pcie_devi
 		/* 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);
 
@@ -302,7 +302,6 @@ err_out_free_ctrl_slot:
 	cleanup_slot(ctrl);
 err_out_release_ctlr:
 	pciehp_release_ctrl(ctrl);
-err_out_none:
 	return -ENODEV;
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCIe / hotplug: Drop pointless label from pciehp_probe()
  2015-05-22 22:38 [PATCH] PCIe / hotplug: Drop pointless label from pciehp_probe() Rafael J. Wysocki
@ 2015-05-22 22:39 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2015-05-22 22:39 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PCI, Linux Kernel Mailing List

On Sat, May 23, 2015 at 12:38:57AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> 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>

Applied to pci/hotplug for v4.2, thanks!

> ---
> 
> On top of https://patchwork.kernel.org/patch/6436921/ .
> 
> ---
>  drivers/pci/hotplug/pciehp_core.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> Index: linux-pm/drivers/pci/hotplug/pciehp_core.c
> ===================================================================
> --- linux-pm.orig/drivers/pci/hotplug/pciehp_core.c
> +++ linux-pm/drivers/pci/hotplug/pciehp_core.c
> @@ -256,13 +256,13 @@ static int pciehp_probe(struct pcie_devi
>  		/* 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);
>  
> @@ -302,7 +302,6 @@ err_out_free_ctrl_slot:
>  	cleanup_slot(ctrl);
>  err_out_release_ctlr:
>  	pciehp_release_ctrl(ctrl);
> -err_out_none:
>  	return -ENODEV;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-22 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 22:38 [PATCH] PCIe / hotplug: Drop pointless label from pciehp_probe() Rafael J. Wysocki
2015-05-22 22:39 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.