diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/intel_menlow.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c index 0c0bb3093e07..80a136352408 100644 --- a/drivers/misc/intel_menlow.c +++ b/drivers/misc/intel_menlow.c | |||
@@ -175,19 +175,17 @@ static int intel_menlow_memory_add(struct acpi_device *device) | |||
175 | goto end; | 175 | goto end; |
176 | } | 176 | } |
177 | 177 | ||
178 | if (cdev) { | 178 | acpi_driver_data(device) = cdev; |
179 | acpi_driver_data(device) = cdev; | 179 | result = sysfs_create_link(&device->dev.kobj, |
180 | result = sysfs_create_link(&device->dev.kobj, | 180 | &cdev->device.kobj, "thermal_cooling"); |
181 | &cdev->device.kobj, "thermal_cooling"); | 181 | if (result) |
182 | if (result) | 182 | goto unregister; |
183 | goto unregister; | 183 | |
184 | 184 | result = sysfs_create_link(&cdev->device.kobj, | |
185 | result = sysfs_create_link(&cdev->device.kobj, | 185 | &device->dev.kobj, "device"); |
186 | &device->dev.kobj, "device"); | 186 | if (result) { |
187 | if (result) { | 187 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); |
188 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); | 188 | goto unregister; |
189 | goto unregister; | ||
190 | } | ||
191 | } | 189 | } |
192 | 190 | ||
193 | end: | 191 | end: |