提交 c836790a 编写于 作者: M Michael Moese 提交者: Greg Kroah-Hartman

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: NDavid Binderman <dcb314@hotmail.com>
Signed-off-by: NMichael Moese <michael.moese@men.de>
Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b7d91c91
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册