power: fix incorrect unregistration in power_supply_create_attrs error path