summaryrefslogtreecommitdiffstats
path: root/drivers/mcb
diff options
context:
space:
mode:
authorMichael Moese <michael.moese@men.de>2016-11-15 10:36:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-15 10:52:37 +0100
commitc836790ae55b854af0e95fce1349ef68f543b79b (patch)
treefb8cf22dca207cbc7d1bdd7cbd5d346fc2c8655b /drivers/mcb
parentMerge 4.9-rc5 into char-misc-next (diff)
downloadlinux-c836790ae55b854af0e95fce1349ef68f543b79b.tar.xz
linux-c836790ae55b854af0e95fce1349ef68f543b79b.zip
mcb: fix compiler warning logical-op in mcb-parse.c
The expression was clearly wrong, the logical AND of expressions must be changed to a logical OR. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Michael Moese <michael.moese@men.de> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb')
-rw-r--r--drivers/mcb/mcb-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c
index 4ca2739b4fad..ee7fb6ec96bd 100644
--- a/drivers/mcb/mcb-parse.c
+++ b/drivers/mcb/mcb-parse.c
@@ -149,7 +149,7 @@ static int chameleon_get_bar(char __iomem **base, phys_addr_t mapbase,
reg = readl(*base);
bar_count = BAR_CNT(reg);
- if (bar_count <= 0 && bar_count > CHAMELEON_BAR_MAX)
+ if (bar_count <= 0 || bar_count > CHAMELEON_BAR_MAX)
return -ENODEV;
c = kcalloc(bar_count, sizeof(struct chameleon_bar),