diff mbox series

thermal: intel: fix unmatched pci_release_region

Message ID 20191206075531.18637-1-hslester96@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show
Series thermal: intel: fix unmatched pci_release_region | expand

Commit Message

Chuhong Yuan Dec. 6, 2019, 7:55 a.m. UTC
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(-)

Comments

Daniel Lezcano Dec. 9, 2019, 3:42 p.m. UTC | #1
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!
Zhang, Rui Jan. 16, 2020, 6:57 a.m. UTC | #2
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);
>  }
>
diff mbox series

Patch

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);
 }