From: Michael Moese Date: Tue, 15 Nov 2016 09:36:51 +0000 (+0100) Subject: mcb: fix compiler warning logical-op in mcb-parse.c X-Git-Tag: v4.10-rc1~146^2~42 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c836790ae55b854af0e95fce1349ef68f543b79b;p=linux.git 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 Signed-off-by: Michael Moese Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman --- 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),