aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Moese <michael.moese@men.de>2016-11-15 04:36:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-15 04:52:37 -0500
commitc836790ae55b854af0e95fce1349ef68f543b79b (patch)
treefb8cf22dca207cbc7d1bdd7cbd5d346fc2c8655b
parentb7d91c915290ab0bfbab84a0fb9c9eae57816982 (diff)
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>
-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,
149 reg = readl(*base); 149 reg = readl(*base);
150 150
151 bar_count = BAR_CNT(reg); 151 bar_count = BAR_CNT(reg);
152 if (bar_count <= 0 && bar_count > CHAMELEON_BAR_MAX) 152 if (bar_count <= 0 || bar_count > CHAMELEON_BAR_MAX)
153 return -ENODEV; 153 return -ENODEV;
154 154
155 c = kcalloc(bar_count, sizeof(struct chameleon_bar), 155 c = kcalloc(bar_count, sizeof(struct chameleon_bar),