of: Remove redundant size check

Remove a redundant check of buffer size.

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Frank Rowand 2016-10-28 23:26:28 -07:00 committed by Rob Herring
parent 624ab2a49c
commit ea8229b788
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,
for (i = 0; i < count; i++) {
off = be32_to_cpu(((__be32 *)prop_fix->value)[i]);
if (off >= prop->length || (off + 4) > prop->length)
if ((off + 4) > prop->length)
return -EINVAL;
phandle = be32_to_cpu(*(__be32 *)(prop->value + off));