FIXUP: CHROMIUM: sbs-battery: make writes to ManufacturerAccess optional

Reading the 'present' sysfs attribute currently returns a random value
if no battery is present.

localhost ~ # cat /sys/class/power_supply/sbs-9-000b/present
-321394304

Since we no longer set the property value for battery presence to 0
after a write to the ManufacturerAccess command register fails,
we need to set it to 0 after the read access failed.

BUG=chrome-os-partner:55954
TEST=Boot with no battery and check battery 'present' attribute value

Change-Id: I109bf2a016d9f4eff61d9beff9e9c21243e37353
Fixes: 57ffef3beb2b ("CHROMIUM: sbs-battery: make writes to ManufacturerAccess optional")
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/381591
Reviewed-by: Brian Norris <briannorris@chromium.org>
1 file changed