diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 75ccf5d18bf4..697335c8423e 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -809,10 +809,12 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
809 | 809 | ||
810 | acpi_processor_remove_fs(device); | 810 | acpi_processor_remove_fs(device); |
811 | 811 | ||
812 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); | 812 | if (pr->cdev) { |
813 | sysfs_remove_link(&pr->cdev->device.kobj, "device"); | 813 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); |
814 | thermal_cooling_device_unregister(pr->cdev); | 814 | sysfs_remove_link(&pr->cdev->device.kobj, "device"); |
815 | pr->cdev = NULL; | 815 | thermal_cooling_device_unregister(pr->cdev); |
816 | pr->cdev = NULL; | ||
817 | } | ||
816 | 818 | ||
817 | processors[pr->id] = NULL; | 819 | processors[pr->id] = NULL; |
818 | 820 | ||