summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@am.sony.com>2016-10-28 23:26:28 -0700
committerRob Herring <robh@kernel.org>2016-11-15 09:17:16 -0600
commitea8229b78899bd1edee3051686a4370e5dd56762 (patch)
tree5f076a84177718a59605e6ecec0322800a443986 /drivers/of
parent624ab2a49ca30fd61f6c268567d74aaaf949a489 (diff)
downloadop-kernel-dev-ea8229b78899bd1edee3051686a4370e5dd56762.zip
op-kernel-dev-ea8229b78899bd1edee3051686a4370e5dd56762.tar.gz
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/resolver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 708daca..76c09cb 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -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));
OpenPOWER on IntegriCloud