All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device
@ 2016-11-19 17:41 ` Quentin Lambert
  0 siblings, 0 replies; 4+ messages in thread
From: Quentin Lambert @ 2016-11-19 17:41 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, linux-kernel, kernel-janitors; +Cc: Quentin Lambert

Most error branches following the call to pci_enable_device contain
a call to pci_disable_device. This patch add these calls where they are
missing.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>

---
 drivers/pci/hotplug/cpqphp_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *
 	 */
 	if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
 		err(msg_HPC_not_supported);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err_disable_device;
 	}
 
 	/* TODO: This code can be made to support non-Compaq or Intel

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

* [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device
@ 2016-11-19 17:41 ` Quentin Lambert
  0 siblings, 0 replies; 4+ messages in thread
From: Quentin Lambert @ 2016-11-19 17:41 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, linux-kernel, kernel-janitors; +Cc: Quentin Lambert

Most error branches following the call to pci_enable_device contain
a call to pci_disable_device. This patch add these calls where they are
missing.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>

---
 drivers/pci/hotplug/cpqphp_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *
 	 */
 	if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
 		err(msg_HPC_not_supported);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err_disable_device;
 	}
 
 	/* TODO: This code can be made to support non-Compaq or Intel

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

* Re: [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device
  2016-11-19 17:41 ` Quentin Lambert
@ 2016-11-23 22:58   ` Bjorn Helgaas
  -1 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2016-11-23 22:58 UTC (permalink / raw)
  To: Quentin Lambert; +Cc: Bjorn Helgaas, linux-pci, linux-kernel, kernel-janitors

On Sat, Nov 19, 2016 at 06:41:48PM +0100, Quentin Lambert wrote:
> Most error branches following the call to pci_enable_device contain
> a call to pci_disable_device. This patch add these calls where they are
> missing.
> 
> This issue was found with Hector.
> 
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>

Applied to pci/hotplug for v4.10, thanks, Quentin!

> ---
>  drivers/pci/hotplug/cpqphp_core.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *
>  	 */
>  	if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
>  		err(msg_HPC_not_supported);
> -		return -ENODEV;
> +		rc = -ENODEV;
> +		goto err_disable_device;
>  	}
>  
>  	/* TODO: This code can be made to support non-Compaq or Intel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device
@ 2016-11-23 22:58   ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2016-11-23 22:58 UTC (permalink / raw)
  To: Quentin Lambert; +Cc: Bjorn Helgaas, linux-pci, linux-kernel, kernel-janitors

On Sat, Nov 19, 2016 at 06:41:48PM +0100, Quentin Lambert wrote:
> Most error branches following the call to pci_enable_device contain
> a call to pci_disable_device. This patch add these calls where they are
> missing.
> 
> This issue was found with Hector.
> 
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>

Applied to pci/hotplug for v4.10, thanks, Quentin!

> ---
>  drivers/pci/hotplug/cpqphp_core.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *
>  	 */
>  	if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
>  		err(msg_HPC_not_supported);
> -		return -ENODEV;
> +		rc = -ENODEV;
> +		goto err_disable_device;
>  	}
>  
>  	/* TODO: This code can be made to support non-Compaq or Intel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-11-23 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 17:41 [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device Quentin Lambert
2016-11-19 17:41 ` Quentin Lambert
2016-11-23 22:58 ` Bjorn Helgaas
2016-11-23 22:58   ` 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.