summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>2016-04-01 12:32:43 +0200
committerOlof Johansson <olof@lixom.net>2016-04-12 21:31:50 +0200
commit3de7beebddf8d56dcaa17b41c723d602dd0c513c (patch)
tree685c663df5d3b2cfff0df6ebb36d334af1d2059a /drivers
parentARM: uniphier: drop weird sizeof() (diff)
downloadlinux-3de7beebddf8d56dcaa17b41c723d602dd0c513c.tar.xz
linux-3de7beebddf8d56dcaa17b41c723d602dd0c513c.zip
bus: uniphier-system-bus: fix condition of overlap check
This patch fixes condition whether the specified address ranges overlap each other. Fixes: 4b7f48d395a7 ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bus/uniphier-system-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index 834a2aeaf27a..350b7309c26d 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -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",