summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-03-12 17:50:32 +0100
committerMark Brown <broonie@kernel.org>2018-03-12 17:50:32 +0100
commitaa584bada6c2114371a415d134f09fc376c8e07b (patch)
tree81cb759d18689ddfcff0d3cbb3d5d6a2583dada7
parentMerge remote-tracking branch 'regmap/fix/cache' into regmap-linus (diff)
parentregmap: Fix reversed bounds check in regmap_raw_write() (diff)
downloadlinux-aa584bada6c2114371a415d134f09fc376c8e07b.tar.xz
linux-aa584bada6c2114371a415d134f09fc376c8e07b.zip
Merge remote-tracking branch 'regmap/fix/core' into regmap-linus
-rw-r--r--drivers/base/regmap/regmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 7519b039c162..c7b7c5fa73ab 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1831,7 +1831,7 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
return -EINVAL;
if (val_len % map->format.val_bytes)
return -EINVAL;
- if (map->max_raw_write && map->max_raw_write > val_len)
+ if (map->max_raw_write && map->max_raw_write < val_len)
return -E2BIG;
map->lock(map->lock_arg);