linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: intel: fix unmatched pci_release_region
@ 2019-12-06  7:55 Chuhong Yuan
  2019-12-09 15:42 ` Daniel Lezcano
  2020-01-16  6:57 ` Zhang Rui
  0 siblings, 2 replies; 3+ messages in thread
From: Chuhong Yuan @ 2019-12-06  7:55 UTC (permalink / raw)
  Cc: Zhang Rui, Eduardo Valentin, Daniel Lezcano, Amit Kucheria,
	linux-pm, linux-kernel, Chuhong Yuan

The driver calls pci_request_regions() in probe and uses
pci_release_regions() in probe failure.
However, it calls pci_release_region() in remove, which does
match the other two calls.
Use pci_release_regions() instead to unify them.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
 drivers/thermal/intel/intel_pch_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 4f0bb8f502e1..5f7798b8d35f 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -365,7 +365,7 @@ static void intel_pch_thermal_remove(struct pci_dev *pdev)
 	thermal_zone_device_unregister(ptd->tzd);
 	iounmap(ptd->hw_base);
 	pci_set_drvdata(pdev, NULL);
-	pci_release_region(pdev, 0);
+	pci_release_regions(pdev);
 	pci_disable_device(pdev);
 }
 
-- 
2.24.0


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

* Re: [PATCH] thermal: intel: fix unmatched pci_release_region
  2019-12-06  7:55 [PATCH] thermal: intel: fix unmatched pci_release_region Chuhong Yuan
@ 2019-12-09 15:42 ` Daniel Lezcano
  2020-01-16  6:57 ` Zhang Rui
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2019-12-09 15:42 UTC (permalink / raw)
  To: Chuhong Yuan
  Cc: Zhang Rui, Eduardo Valentin, Amit Kucheria, linux-pm, linux-kernel

On 06/12/2019 08:55, Chuhong Yuan wrote:
> The driver calls pci_request_regions() in probe and uses
> pci_release_regions() in probe failure.
> However, it calls pci_release_region() in remove, which does
> match the other two calls.
> Use pci_release_regions() instead to unify them.
> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>

Applied, thanks!


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH] thermal: intel: fix unmatched pci_release_region
  2019-12-06  7:55 [PATCH] thermal: intel: fix unmatched pci_release_region Chuhong Yuan
  2019-12-09 15:42 ` Daniel Lezcano
@ 2020-01-16  6:57 ` Zhang Rui
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang Rui @ 2020-01-16  6:57 UTC (permalink / raw)
  To: Chuhong Yuan
  Cc: Eduardo Valentin, Daniel Lezcano, Amit Kucheria, linux-pm, linux-kernel

On Fri, 2019-12-06 at 15:55 +0800, Chuhong Yuan wrote:
> The driver calls pci_request_regions() in probe and uses
> pci_release_regions() in probe failure.
> However, it calls pci_release_region() in remove, which does
> match the other two calls.
> Use pci_release_regions() instead to unify them.
> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>

Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/thermal/intel/intel_pch_thermal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/intel/intel_pch_thermal.c
> b/drivers/thermal/intel/intel_pch_thermal.c
> index 4f0bb8f502e1..5f7798b8d35f 100644
> --- a/drivers/thermal/intel/intel_pch_thermal.c
> +++ b/drivers/thermal/intel/intel_pch_thermal.c
> @@ -365,7 +365,7 @@ static void intel_pch_thermal_remove(struct
> pci_dev *pdev)
>  	thermal_zone_device_unregister(ptd->tzd);
>  	iounmap(ptd->hw_base);
>  	pci_set_drvdata(pdev, NULL);
> -	pci_release_region(pdev, 0);
> +	pci_release_regions(pdev);
>  	pci_disable_device(pdev);
>  }
>  


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

end of thread, other threads:[~2020-01-16  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06  7:55 [PATCH] thermal: intel: fix unmatched pci_release_region Chuhong Yuan
2019-12-09 15:42 ` Daniel Lezcano
2020-01-16  6:57 ` Zhang Rui

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