summaryrefslogtreecommitdiff
path: root/common/virtual_battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/virtual_battery.c')
-rw-r--r--common/virtual_battery.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/virtual_battery.c b/common/virtual_battery.c
index adb4e96d7f..743f2a8801 100644
--- a/common/virtual_battery.c
+++ b/common/virtual_battery.c
@@ -103,9 +103,6 @@ int virtual_battery_handler(struct ec_response_i2c_passthru *resp, int in_len,
if (cache_hit)
*err_code = 0;
break;
- default:
- reset_parse_state();
- return EC_ERROR_INVAL;
}
acc_write_len += write_len;
@@ -129,10 +126,15 @@ int virtual_battery_handler(struct ec_response_i2c_passthru *resp, int in_len,
read_len, 0);
}
break;
+ /* LCOV_EXCL_START - Unreachable in IDLE state and remaining
+ * states covered above.
+ */
default:
reset_parse_state();
return EC_ERROR_INVAL;
}
+ /* LCOV_EXCL_STOP */
+
/* Reset the state in the end of messages */
reset_parse_state();
}