Re: [PATCH 2/2] power: fix incorrect unregistration in power_supply_create_attrs error path

2007-12-12 Thread Anton Vorontsov
On Wed, Dec 12, 2007 at 02:12:59PM -0500, Andres Salomon wrote: > > In power_supply_create_attrs(), we create static attributes as referenced > by power_supply_static_attrs[i]. After that, if we fail, we unregister > via power_supply_static_attrs[psy->properties[i]]. This is incorrect, as > psy-

[PATCH 2/2] power: fix incorrect unregistration in power_supply_create_attrs error path

2007-12-12 Thread Andres Salomon
In power_supply_create_attrs(), we create static attributes as referenced by power_supply_static_attrs[i]. After that, if we fail, we unregister via power_supply_static_attrs[psy->properties[i]]. This is incorrect, as psy->properties has absolutely no bearing on static attribs. This patch fixes