common/mkbp_event: Avoid accessing an uninitialized variable
Found by Coverity Scan
BRANCH=none
TEST=none
Tested-by: Patrick Georgi
@@ -316,10 +316,12 @@ static int take_event_if_set(uint8_t event_type)
static int mkbp_get_next_event(struct host_cmd_handler_args *args)
{
static int last;
- int i, data_size, evt;
+ int i, evt;
uint8_t *resp = args->response;
const struct mkbp_event_source *src;
+ int data_size = -EC_ERROR_BUSY;
+
do {
/*
* Find the next event to service. We do this in a round-robin
