mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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:
parent
e9ae71078b
commit
9030062f3d
4 changed files with 54 additions and 63 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue