summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <[email protected]>2021-04-07 09:12:28 +0200
committerStefan Roese <[email protected]>2021-04-28 10:05:12 +0200
commita8e338a229451372e5281d7eba9b741c807a829a (patch)
treef303d6a146da7c009d1408bd6b02aa832eca9d9a
parentae404af8dc44aa1eb17f46027c345313553b4098 (diff)
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 <[email protected]>
-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 4b10effefb7..12695df9bca 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),