aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2018-03-08 09:49:24 -0800
committerMarat Dukhan <marat@fb.com>2018-03-08 10:02:46 -0800
commitec133e749db27536d8d3f133faa4c9291a249795 (patch)
tree995f4b5a22fe14e244fd9a43d64df3e1dc82dd12 /src
parentdcf096ddf869883e623765882b1a6d8df971202b (diff)
downloadcpuinfo-ec133e749db27536d8d3f133faa4c9291a249795.tar.gz
Fix bug of misdetecting chipsets with partially matched signatures
Diffstat (limited to 'src')
-rw-r--r--src/arm/linux/chipset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arm/linux/chipset.c b/src/arm/linux/chipset.c
index 487ddba..7319731 100644
--- a/src/arm/linux/chipset.c
+++ b/src/arm/linux/chipset.c
@@ -303,7 +303,7 @@ static bool match_samsung_exynos(
const uint32_t digit = (uint32_t) (uint8_t) (*pos++) - '0';
if (digit >= 10) {
/* Not really a digit */
- return start;
+ return false;
}
model = model * 10 + digit;
}
@@ -314,7 +314,7 @@ static bool match_samsung_exynos(
.series = cpuinfo_arm_chipset_series_samsung_exynos,
.model = model,
};
- return pos;
+ return true;
}
/**
@@ -648,7 +648,7 @@ static bool match_kirin(
const uint32_t digit = (uint32_t) (uint8_t) end[i - 3] - '0';
if (digit >= 10) {
/* Not really a digit */
- return start;
+ return false;
}
model = model * 10 + digit;
}
@@ -705,7 +705,7 @@ static bool match_rk(
const uint32_t digit = (uint32_t) (uint8_t) start[i] - '0';
if (digit >= 10) {
/* Not really a digit */
- return start;
+ return false;
}
model = model * 10 + digit;
}