diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-29 16:44:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-29 16:44:34 -0400 |
| commit | 358a9afc35d550db4f67b1c8336f5326244ceeda (patch) | |
| tree | f655236e34eb0a5d527dbd972600dd76305897df /drivers/hwmon/applesmc.c | |
| parent | 55663219378eecd6fccb319be27ce6737a535e4c (diff) | |
| parent | 6996abf0962bb86b6285987a4698f6d275ff531f (diff) | |
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon/applesmc: Handle name file creation error and deletion
hwmon/applesmc: Simplify dependencies
hwmon-vid: Don't spam the logs when VRM version is missing
hwmon/w83627hf: Be quiet when no chip is found
hwmon/coretemp: Add more safety checks
hwmon/ds1621: Fix swapped temperature limits
Diffstat (limited to 'drivers/hwmon/applesmc.c')
| -rw-r--r-- | drivers/hwmon/applesmc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 366f4a1a2cb8..fd1281f42209 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
| @@ -1206,11 +1206,13 @@ static int __init applesmc_init(void) | |||
| 1206 | } | 1206 | } |
| 1207 | 1207 | ||
| 1208 | ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_name.attr); | 1208 | ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_name.attr); |
| 1209 | if (ret) | ||
| 1210 | goto out_device; | ||
| 1209 | 1211 | ||
| 1210 | /* Create key enumeration sysfs files */ | 1212 | /* Create key enumeration sysfs files */ |
| 1211 | ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group); | 1213 | ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group); |
| 1212 | if (ret) | 1214 | if (ret) |
| 1213 | goto out_device; | 1215 | goto out_name; |
| 1214 | 1216 | ||
| 1215 | /* create fan files */ | 1217 | /* create fan files */ |
| 1216 | count = applesmc_get_fan_count(); | 1218 | count = applesmc_get_fan_count(); |
| @@ -1310,6 +1312,8 @@ out_fan_1: | |||
| 1310 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); | 1312 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); |
| 1311 | out_key_enumeration: | 1313 | out_key_enumeration: |
| 1312 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); | 1314 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); |
| 1315 | out_name: | ||
| 1316 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); | ||
| 1313 | out_device: | 1317 | out_device: |
| 1314 | platform_device_unregister(pdev); | 1318 | platform_device_unregister(pdev); |
| 1315 | out_driver: | 1319 | out_driver: |
| @@ -1335,6 +1339,7 @@ static void __exit applesmc_exit(void) | |||
| 1335 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]); | 1339 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]); |
| 1336 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); | 1340 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); |
| 1337 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); | 1341 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); |
| 1342 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); | ||
| 1338 | platform_device_unregister(pdev); | 1343 | platform_device_unregister(pdev); |
| 1339 | platform_driver_unregister(&applesmc_driver); | 1344 | platform_driver_unregister(&applesmc_driver); |
| 1340 | release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS); | 1345 | release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS); |
