From c836790ae55b854af0e95fce1349ef68f543b79b Mon Sep 17 00:00:00 2001 From: Michael Moese Date: Tue, 15 Nov 2016 10:36:51 +0100 Subject: 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 --- drivers/mcb/mcb-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mcb') 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), -- cgit v1.2.3