linux: Don't set out_state before state is final
Currently up_device_supply_refresh_battery sets out_state before the state value is definitive, so the wrong state value is returned to the caller. Luckily the only caller does not make use of this value at the moment, so there are no user-visible consequences. Nonetheless this is a bug, so this commit fixes it.
Showing with 2 additions and 1 deletion