]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/misc/intel_menlow.c
sgi-xp: setup the activate GRU message queue
[mv-sheeva.git] / drivers / misc / intel_menlow.c
index 3db83a2dc3a1fc76f72bd87b26c77cb2493a0cdb..80a1363524087a1e66e575058360d071bbca352f 100644 (file)
@@ -179,11 +179,14 @@ static int intel_menlow_memory_add(struct acpi_device *device)
        result = sysfs_create_link(&device->dev.kobj,
                                &cdev->device.kobj, "thermal_cooling");
        if (result)
-               printk(KERN_ERR PREFIX "Create sysfs link\n");
+               goto unregister;
+
        result = sysfs_create_link(&cdev->device.kobj,
                                &device->dev.kobj, "device");
-       if (result)
-               printk(KERN_ERR PREFIX "Create sysfs link\n");
+       if (result) {
+               sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
+               goto unregister;
+       }
 
  end:
        return result;