Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40191
b: refs/heads/master
c: 97f80bc
h: refs/heads/master
i:
  40189: b1b8e8e
  40187: 424fd10
  40183: 6b06592
  40175: d7b5571
  40159: 8b2ea71
  40127: d737a25
  40063: 4997629
  39935: b6c8e1c
v: v3
  • Loading branch information
Jeff Garzik authored and David S. Miller committed Oct 22, 2006
1 parent b42d7a3 commit 2c6f516
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: fd169f15a67b47f23bd1704919c719a8e8409a73
refs/heads/master: 97f80bc66f5c6384e3aab70c67340116b8c4284b
15 changes: 12 additions & 3 deletions trunk/net/atm/atm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static struct class atm_class = {
int atm_register_sysfs(struct atm_dev *adev)
{
struct class_device *cdev = &adev->class_dev;
int i, err;
int i, j, err;

cdev->class = &atm_class;
class_set_devdata(cdev, adev);
Expand All @@ -151,10 +151,19 @@ int atm_register_sysfs(struct atm_dev *adev)
if (err < 0)
return err;

for (i = 0; atm_attrs[i]; i++)
class_device_create_file(cdev, atm_attrs[i]);
for (i = 0; atm_attrs[i]; i++) {
err = class_device_create_file(cdev, atm_attrs[i]);
if (err)
goto err_out;
}

return 0;

err_out:
for (j = 0; j < i; j++)
class_device_remove_file(cdev, atm_attrs[j]);
class_device_del(cdev);
return err;
}

void atm_unregister_sysfs(struct atm_dev *adev)
Expand Down

0 comments on commit 2c6f516

Please sign in to comment.