max17042_battery: Fix error handling