]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mcb: fix compiler warning logical-op in mcb-parse.c
authorMichael Moese <michael.moese@men.de>
Tue, 15 Nov 2016 09:36:51 +0000 (10:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Nov 2016 09:52:37 +0000 (10:52 +0100)
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>
drivers/mcb/mcb-parse.c

index 4ca2739b4fad54f0b3c07089f3802d43e75c4e3b..ee7fb6ec96bd17e599905c947e06533b81ce9857 100644 (file)
@@ -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),