Commit ea8229b7 authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

of: Remove redundant size check

Remove a redundant check of buffer size.
Signed-off-by: default avatarFrank Rowand <frank.rowand@am.sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 624ab2a4
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment