Commit af0f85c3 authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Greg Kroah-Hartman

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

commit 3de7beeb upstream.

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

Fixes: 4b7f48d3 ("bus: uniphier-system-bus: add UniPhier System Bus driver")
Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Acked-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 091391b8
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment