Follow r275792 eliminating fdt_data_verify().

This commit is contained in:
Ruslan Bukin 2014-12-15 11:57:39 +00:00
parent ba2ea14a6a
commit 1f7f3314d1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275799
2 changed files with 3 additions and 5 deletions

View File

@ -1939,8 +1939,7 @@ fdt_get_ranges(const char *nodename, void *buf, int size, int *tuples,
if (tuples_count <= 0)
return (ERANGE);
if (fdt_ranges_verify(buf, tuples_count, par_addr_cells,
addr_cells, size_cells) != 0)
if (par_addr_cells > 2 || addr_cells > 2 || size_cells > 2)
return (ERANGE);
*tuples = tuples_count;

View File

@ -180,8 +180,7 @@ mv_pci_ranges_decode(phandle_t node, struct mv_pci_range *io_space,
rangesptr += offset_cells;
}
if (fdt_data_verify((void *)rangesptr, par_addr_cells -
offset_cells)) {
if ((par_addr_cells - offset_cells) > 2) {
rv = ERANGE;
goto out;
}
@ -189,7 +188,7 @@ mv_pci_ranges_decode(phandle_t node, struct mv_pci_range *io_space,
par_addr_cells - offset_cells);
rangesptr += par_addr_cells - offset_cells;
if (fdt_data_verify((void *)rangesptr, size_cells)) {
if (size_cells > 2)
rv = ERANGE;
goto out;
}