* [PATCH] mcb: fix compiler warning logical-op in mcb-parse.c
@ 2016-10-19 12:37 Michael Moese
0 siblings, 0 replies; only message in thread
From: Michael Moese @ 2016-10-19 12:37 UTC (permalink / raw)
To: jthumshirn; +Cc: linux-kernel, dcb314, Michael Moese
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>
---
drivers/mcb/mcb-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c
index 4ca2739..ee7fb6e 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),
--
2.10.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-19 16:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 12:37 [PATCH] mcb: fix compiler warning logical-op in mcb-parse.c Michael Moese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome