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 <[email protected]>
Signed-off-by: Michael Moese <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Michael Moese 2016-11-15 10:36:51 +01:00 • committed by Greg Kroah-Hartman
commit c836790ae5

View 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),