linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: Don't duplicate fix up for positive error code
@ 2017-02-06 15:34 Gabriel Krisman Bertazi
  2017-02-10 21:13 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-02-06 15:34 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, Gabriel Krisman Bertazi

Function __pci_device_probe tries to be careful about a PCI driver
probe() hook returning a positive value, but this is not really
necessary, since the same fix up is already done in
local_pci_probe (preceded by a noisy warning), which renders this
instance dead code.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
 drivers/pci/pci-driver.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 1ccce1cd6aca..3e0516ee9eab 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -381,8 +381,6 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
 		id = pci_match_device(drv, pci_dev);
 		if (id)
 			error = pci_call_probe(drv, pci_dev, id);
-		if (error >= 0)
-			error = 0;
 	}
 	return error;
 }
-- 
2.11.0

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

* Re: [PATCH] pci: Don't duplicate fix up for positive error code
  2017-02-06 15:34 [PATCH] pci: Don't duplicate fix up for positive error code Gabriel Krisman Bertazi
@ 2017-02-10 21:13 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-02-10 21:13 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi; +Cc: bhelgaas, linux-pci

On Mon, Feb 06, 2017 at 01:34:14PM -0200, Gabriel Krisman Bertazi wrote:
> Function __pci_device_probe tries to be careful about a PCI driver
> probe() hook returning a positive value, but this is not really
> necessary, since the same fix up is already done in
> local_pci_probe (preceded by a noisy warning), which renders this
> instance dead code.
> 
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>

Applied to pci/enumeration for v4.11, thanks, Gabriel!

> ---
>  drivers/pci/pci-driver.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 1ccce1cd6aca..3e0516ee9eab 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -381,8 +381,6 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
>  		id = pci_match_device(drv, pci_dev);
>  		if (id)
>  			error = pci_call_probe(drv, pci_dev, id);
> -		if (error >= 0)
> -			error = 0;
>  	}
>  	return error;
>  }
> -- 
> 2.11.0
> 

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

end of thread, other threads:[~2017-02-10 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 15:34 [PATCH] pci: Don't duplicate fix up for positive error code Gabriel Krisman Bertazi
2017-02-10 21:13 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).