From: Kaushlendra Kumar Date: Mon, 15 Dec 2025 09:13:52 +0000 (+0530) Subject: thermal: intel: intel_pch_thermal: Drop explicit driver data clearing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0873527c599b5acae9eee1543806752ed254f7;p=thirdparty%2Flinux.git thermal: intel: intel_pch_thermal: Drop explicit driver data clearing 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 [ rjw: Subject rewrite ] Link: https://patch.msgid.link/20251215091352.1250531-1-kaushlendra.kumar@intel.com Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index fc326985796c7..52e71af67dc6f 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -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); }