Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57052
b: refs/heads/master
c: 6996abf
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Boichat authored and Jean Delvare committed May 27, 2007
1 parent 76f4867 commit 0655145
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 548c343b2ff03488b913440799e83d66d7db8fad
refs/heads/master: 6996abf0962bb86b6285987a4698f6d275ff531f
7 changes: 6 additions & 1 deletion trunk/drivers/hwmon/applesmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,11 +1206,13 @@ static int __init applesmc_init(void)
}

ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_name.attr);
if (ret)
goto out_device;

/* Create key enumeration sysfs files */
ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group);
if (ret)
goto out_device;
goto out_name;

/* create fan files */
count = applesmc_get_fan_count();
Expand Down Expand Up @@ -1310,6 +1312,8 @@ static int __init applesmc_init(void)
sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
out_key_enumeration:
sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group);
out_name:
sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr);
out_device:
platform_device_unregister(pdev);
out_driver:
Expand All @@ -1335,6 +1339,7 @@ static void __exit applesmc_exit(void)
sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]);
sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]);
sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group);
sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr);
platform_device_unregister(pdev);
platform_driver_unregister(&applesmc_driver);
release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS);
Expand Down

0 comments on commit 0655145

Please sign in to comment.