thermal: intel_pch: Drop explicit pci_set_drvdata(NULL) in remove
PATCH 1/1 thermal: intel_pch: Drop explicit pci_set_drvdata(NULL) in remove
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 <[email protected]>
--- drivers/thermal/intel/intel_pch_thermal.c | 1 - 1 file changed, 1 deletion(-)
drivers/thermal/intel/intel_pch_thermal.c +0 -1
@@ -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); }
Signature · 1 line
2.34.1
Quoted 15 lines · Kaushlendra Kumar
The driver uses
devm_kzalloc()for device allocation, making thepci_set_drvdata(pdev, NULL)call in the remove path unnecessary. The driver core clears drvdata automatically during device removal.Signed-off-by Kaushlendra Kumar <[email protected]>--- drivers/thermal/intel/intel_pch_thermal.c | 1 - 1 file changed, 1 deletion(-)drivers/thermal/intel/intel_pch_thermal.c +0
-0
drivers/thermal/intel/intel_pch_thermal.c static void intel_pch_thermal_remove(struct pci_dev *pdev)
Quoted 8 lines
drivers/thermal/intel/intel_pch_thermal.c +0
-2@@ -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); } --
Applied as 6.20 material, thanks!