aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2021-04-07 09:12:28 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2021-04-23 21:22:55 +0200
commit2b6a72ed080923efa282520ae5987221e69a91d0 (patch)
tree3c823dab7e7683d3fa84a62e47dea36ad7bf624b
parent39e0f648d347a884e14e3c01f31f6d74b981672c (diff)
downloadu-boot-2b6a72ed080923efa282520ae5987221e69a91d0.zip
u-boot-2b6a72ed080923efa282520ae5987221e69a91d0.tar.gz
u-boot-2b6a72ed080923efa282520ae5987221e69a91d0.tar.bz2
mips: octeon: cvmx-bootmem: Fix compare in "if" statement
While porting from the Marvell source, I introduced a bug by misplacing the parenthesis. This patch fixes this issue. Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--arch/mips/mach-octeon/cvmx-bootmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/mach-octeon/cvmx-bootmem.c b/arch/mips/mach-octeon/cvmx-bootmem.c
index 4b10eff..12695df 100644
--- a/arch/mips/mach-octeon/cvmx-bootmem.c
+++ b/arch/mips/mach-octeon/cvmx-bootmem.c
@@ -283,8 +283,8 @@ static int __cvmx_bootmem_check_version(int exact_match)
int major_version;
major_version = CVMX_BOOTMEM_DESC_GET_FIELD(major_version);
- if (major_version > 3 ||
- (exact_match && major_version) != exact_match) {
+ if ((major_version > 3) ||
+ (exact_match && major_version != exact_match)) {
debug("ERROR: Incompatible bootmem descriptor version: %d.%d at addr: 0x%llx\n",
major_version,
(int)CVMX_BOOTMEM_DESC_GET_FIELD(minor_version),