Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81084
b: refs/heads/master
c: 1e77103
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Kerr authored and Arnd Bergmann committed Dec 19, 2007
1 parent f05e6ec commit 202c3d0
Show file tree
Hide file tree
Showing 2 changed files with 18 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: 684bd614015188561197342fd336292e9e2ce196
refs/heads/master: 1e7710390f95b7efb3f74fd2f8b5fc28656b458c
20 changes: 17 additions & 3 deletions trunk/arch/powerpc/platforms/cell/spu_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,27 @@ EXPORT_SYMBOL_GPL(spu_add_sysdev_attr);
int spu_add_sysdev_attr_group(struct attribute_group *attrs)
{
struct spu *spu;
int rc = 0;

mutex_lock(&spu_full_list_mutex);
list_for_each_entry(spu, &spu_full_list, full_list)
sysfs_create_group(&spu->sysdev.kobj, attrs);
list_for_each_entry(spu, &spu_full_list, full_list) {
rc = sysfs_create_group(&spu->sysdev.kobj, attrs);

/* we're in trouble here, but try unwinding anyway */
if (rc) {
printk(KERN_ERR "%s: can't create sysfs group '%s'\n",
__func__, attrs->name);

list_for_each_entry_continue_reverse(spu,
&spu_full_list, full_list)
sysfs_remove_group(&spu->sysdev.kobj, attrs);
break;
}
}

mutex_unlock(&spu_full_list_mutex);

return 0;
return rc;
}
EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);

Expand Down

0 comments on commit 202c3d0

Please sign in to comment.