equal
deleted
inserted
replaced
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; |