thermal: intel: fix unmatched pci_release_region
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
@@ -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
Daniel Lezcano
AppliedQuoted 7 lines · Chuhong Yuan
The driver calls
pci_request_regions()in probe and usespci_release_regions()in probe failure.
However, it callspci_release_region()in remove, which does match the other two calls.
Usepci_release_regions()instead to unify them.Signed-off-by Chuhong Yuan <[email protected]>
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
Quoted 7 lines · Chuhong Yuan
The driver calls
pci_request_regions()in probe and usespci_release_regions()in probe failure.
However, it callspci_release_region()in remove, which does match the other two calls.
Usepci_release_regions()instead to unify them.Signed-off-by Chuhong Yuan <[email protected]>
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@@ -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); }