Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37930 )
Change subject: ec/google: Fix wedging AP on early ec sw sync ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37930/3/src/ec/google/chromeec/ec.c File src/ec/google/chromeec/ec.c:
https://review.coreboot.org/c/coreboot/+/37930/3/src/ec/google/chromeec/ec.c... PS3, Line 768: With this change, if rv is non-zero but other than -EC_RES_INVALID_PARAM and -EC_RES_INVALID_COMMAND, then limit_power would be set to resp.get_param.value which might not really be valid. Probably, it would get ignored by the caller, but shouldn't there be an early return here?
if (rv == -EC_RES_INVALID_PARAM || rv == -EC_RES_INVALID_COMMAND) { ... } else if (rv != 0) { return -1; }
*limit_power = resp.get_param.value; return 0;