]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/intel_menlow.c
ACPI: elide a non-zero test on a result that is never 0
[linux-2.6-omap-h63xx.git] / drivers / misc / intel_menlow.c
index de16e88eb8d3d89785fdefce12a7953c878bb0c6..3db83a2dc3a1fc76f72bd87b26c77cb2493a0cdb 100644 (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;
@@ -213,7 +208,7 @@ static int intel_menlow_memory_remove(struct acpi_device *device, int type)
        return 0;
 }
 
-const static struct acpi_device_id intel_menlow_memory_ids[] = {
+static const struct acpi_device_id intel_menlow_memory_ids[] = {
        {"INT0002", 0},
        {"", 0},
 };