ACPI: elide a non-zero test on a result that is never 0

thermal_cooling_device_register used to return NULL if THERMAL is "n".
As the ACPI fan, processor and video drivers SELECT the generic
thermal in PATCH 01, this is not a problem any more.

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
Julia Lawall 2008-04-11 10:09:24 +08:00 • committed by Len Brown
commit 9030062f3d
4 changed files with 54 additions and 63 deletions

View file

@ -175,20 +175,15 @@ static int intel_menlow_memory_add(struct acpi_device *device)
goto end;
}
if (cdev) {
acpi_driver_data(device) = cdev;
result = sysfs_create_link(&device->dev.kobj,
&cdev->device.kobj, "thermal_cooling");
if (result)
goto unregister;
result = sysfs_create_link(&cdev->device.kobj,
&device->dev.kobj, "device");
if (result) {
sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
goto unregister;
}
}
acpi_driver_data(device) = cdev;
result = sysfs_create_link(&device->dev.kobj,
&cdev->device.kobj, "thermal_cooling");
if (result)
printk(KERN_ERR PREFIX "Create sysfs link\n");
result = sysfs_create_link(&cdev->device.kobj,
&device->dev.kobj, "device");
if (result)
printk(KERN_ERR PREFIX "Create sysfs link\n");
end:
return result;