regmap: check right noinc bounds in debug print
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Aug 2022 13:57:00 +0000 (15:57 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 23 Aug 2022 16:47:16 +0000 (17:47 +0100)
commitb7059927c3e32c96d2ff50c206549d8fac0ba69e
tree708ebd0db948c50b25c1fe9bd6ee9aa4ce36693f
parent026c99b508f060d3c85fda06b21e010683ef5590
regmap: check right noinc bounds in debug print

We were using the wrong bound in the debug prints: this
needs to be the number of elements, not the number of bytes,
since we're indexing into an element-size typed array.

Fixes: c20cc099b30a ("regmap: Support accelerated noinc operations")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220823135700.265019-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c