commit | adf0d99042df7e6c57045c581e2cd4f74ac650dd | [log] [tgz] |
---|---|---|
author | Thierry Reding <treding@nvidia.com> | Fri Mar 15 16:32:32 2019 +0100 |
committer | Tom Rini <trini@konsulko.com> | Tue Apr 23 17:57:23 2019 -0400 |
tree | b23369b36dbb5744eb1baec233243b49e42e12c0 | |
parent | f5be0a4b1c1353bdef5f14594606cad9aad938ac [diff] |
pci: Add boundary check for hose->regions Make sure that we don't overflow the hose->regions array, otherwise we would end up overwriting the hose->region_count field and cause mayhem to ensue. Also print an error message when we'd be overflowing because it indicates that there aren't enough regions available and the number needs to be increased. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>