diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2016-11-12 13:50:17 +0100 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2016-12-06 18:50:27 +0100 |
commit | 30140d2be95acb683d74d6a3ac13ce1cf791971b (patch) | |
tree | b2b45b5fe8f47fe3fae98a5493afbf6c06d26d60 /src/soc | |
parent | 522dcd1249d577c1828cb49f6cd300bc11c6f914 (diff) | |
download | coreboot-30140d2be95acb683d74d6a3ac13ce1cf791971b.tar.xz |
soc/marvell/mvmap2315: Fix integer arithmetic
Replace logical with bitwise AND operator.
Change-Id: I712fab61fbbc833fc2b2575948a875e2f07fd5de
Reported-by: Coverity (CID 1362808)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17401
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/marvell/mvmap2315/mcu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/marvell/mvmap2315/mcu.c b/src/soc/marvell/mvmap2315/mcu.c index c334cda145..e634ff8d56 100644 --- a/src/soc/marvell/mvmap2315/mcu.c +++ b/src/soc/marvell/mvmap2315/mcu.c @@ -31,7 +31,7 @@ static u8 mvmap2315_calc_checksum(const void *data, u32 size) for (i = csum = 0; i < size; i++) csum += bytes[i]; - return (~csum) && 0xFF; + return (~csum) & 0xFF; } void mcu_irq(void) |