Skip to contentSkip to conversation

thermal: intel: fix unmatched pci_release_region

PATCH Applied Chuhong Yuan 3 participants 3 messages Dec 6, 2019 – Jan 16, 2020 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: intel: fix unmatched pci_release_region

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.

---
 drivers/thermal/intel/intel_pch_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/intel_pch_thermal.c +1 -1
index 4f0bb8f502e1..5f7798b8d35f 100644
@@ -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);
 }
 
Signature · 1 line
2.24.0
#1 lore raw
Quoted 7 lines · 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.

Applied, thanks!

Signature · 5 lines
 <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
reviewer Acked-by on v1 1/1
#2 lore raw
In reply to Chuhong Yuan
Quoted 7 lines · 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.

Quoted 19 lines
---
 drivers/thermal/intel/intel_pch_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/intel_pch_thermal.c +1 -1
index 4f0bb8f502e1..5f7798b8d35f 100644
@@ -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);
 }