memory: omap-gpmc: Fix a couple off by ones
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 25 Aug 2020 10:47:07 +0000 (13:47 +0300)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 26 Aug 2020 18:22:12 +0000 (20:22 +0200)
commit4c54228ac8fd55044195825873c50a524131fa53
tree9c701440abda15260fd9cbf356a5259272ff20eb
parentf42ae4bbf94c15aa720afb9d176ecbfe140d792e
memory: omap-gpmc: Fix a couple off by ones

These comparisons should be >= instead of > to prevent reading one
element beyond the end of the gpmc_cs[] array.

Fixes: cdd6928c589a ("ARM: OMAP2+: Add device-tree support for NOR flash")
Fixes: f37e4580c409 ("ARM: OMAP2: Dynamic allocator for GPMC memory space")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200825104707.GB278587@mwanda
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/memory/omap-gpmc.c