소스 검색

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>
Michael Moese 8 년 전
부모
커밋
c836790ae5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/mcb/mcb-parse.c

+ 1 - 1
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),