]> git.baikalelectronics.ru Git - kernel.git/commitdiff
thermal: intel: Fix unmatched pci_release_region
authorChuhong Yuan <hslester96@gmail.com>
Fri, 6 Dec 2019 07:55:31 +0000 (15:55 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 27 Jan 2020 10:43:24 +0000 (11:43 +0100)
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>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191206075531.18637-1-hslester96@gmail.com
drivers/thermal/intel/intel_pch_thermal.c

index 4f0bb8f502e16ea488b624640aa29844e934a29b..5f7798b8d35fd97453f2288e083487aebe0a1475 100644 (file)
@@ -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);
 }