master/slave.c
changeset 696 24fac09b5b26
parent 660 582a90a34303
child 730 226fe5065cf2
equal deleted inserted replaced
695:661ad8bd5ea1 696:24fac09b5b26
   923     if (request.size < 0x0041) {
   923     if (request.size < 0x0041) {
   924         EC_ERR("EEPROM data too short! Dropping.\n");
   924         EC_ERR("EEPROM data too short! Dropping.\n");
   925         return -EINVAL;
   925         return -EINVAL;
   926     }
   926     }
   927 
   927 
   928     cat_header = request.words + 0x0040; // first category header
   928     cat_header = request.words + EC_FIRST_EEPROM_CATEGORY_OFFSET;
   929     cat_type = EC_READ_U16(cat_header);
   929     cat_type = EC_READ_U16(cat_header);
   930     while (cat_type != 0xFFFF) { // cycle through categories
   930     while (cat_type != 0xFFFF) { // cycle through categories
   931         if (cat_header + 1 > request.words + request.size) {
   931         if (cat_header + 1 > request.words + request.size) {
   932             EC_ERR("EEPROM data corrupted! Dropping.\n");
   932             EC_ERR("EEPROM data corrupted! Dropping.\n");
   933             return -EINVAL;
   933             return -EINVAL;