[Cbe-oss-dev] [patch 10/13] powerpc: sysfs fix compiler warning
Arnd Bergmann
arnd at arndb.de
Thu Jul 19 08:32:12 EST 2007
On Wednesday 18 July 2007, Andrew Morton wrote:
> > for_each_possible_cpu(cpu) {
> > sysdev = get_cpu_sysdev(cpu);
> > - sysfs_create_group(&sysdev->kobj, attrs);
> > + error = sysfs_create_group(&sysdev->kobj, attrs);
> > +
> > + if (error) {
> > + for_each_possible_cpu(cpu) {
> > + sysdev = get_cpu_sysdev(cpu);
> > + sysfs_remove_group(&sysdev->kobj, attrs);
> > + }
> > + break;
> > + }
> > }
> >
> > mutex_unlock(&cpu_mutex);
> > - return 0;
> > + return error;
> > }
> > EXPORT_SYMBOL_GPL(cpu_add_sysdev_attr_group);
>
> This will attempt to remove groups which were never added. I don't know
> what will happen then.
I looked at the code and it doesn't look too good. Let's drop this patch for
now. Christian, please submit a new patch when you've found a solution.
Arnd <><
More information about the cbe-oss-dev
mailing list