]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal: intel: intel_pch_thermal: Drop explicit driver data clearing
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Mon, 15 Dec 2025 09:13:52 +0000 (14:43 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Jan 2026 20:08:11 +0000 (21:08 +0100)
The driver uses devm_kzalloc() for device allocation, making the
pci_set_drvdata(pdev, NULL) call in the remove path unnecessary.

The driver core clears drvdata automatically during device removal.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
[ rjw: Subject rewrite ]
Link: https://patch.msgid.link/20251215091352.1250531-1-kaushlendra.kumar@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/intel_pch_thermal.c

index fc326985796c7a2e56234cb2e23d33ba4d4bfe91..52e71af67dc6f8f5ed4c1e642e178c710496a3bc 100644 (file)
@@ -269,7 +269,6 @@ 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_regions(pdev);
        pci_disable_device(pdev);
 }