1
0
Fork 0

bus: uniphier-system-bus: fix condition of overlap check

This patch fixes condition whether the specified address ranges
overlap each other.

Fixes: 4b7f48d395 ("bus: uniphier-system-bus: add UniPhier System Bus driver")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Kunihiko Hayashi 2016-04-01 19:32:43 +09:00 committed by Olof Johansson
parent 3137b71656
commit 3de7beebdd

View file

@ -108,7 +108,7 @@ static int uniphier_system_bus_check_overlap(
for (i = 0; i < ARRAY_SIZE(priv->bank); i++) {
for (j = i + 1; j < ARRAY_SIZE(priv->bank); j++) {
if (priv->bank[i].end > priv->bank[j].base ||
if (priv->bank[i].end > priv->bank[j].base &&
priv->bank[i].base < priv->bank[j].end) {
dev_err(priv->dev,
"region overlap between bank%d and bank%d\n",