diff options
author | Marat Dukhan <marat@fb.com> | 2018-03-08 09:49:24 -0800 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2018-03-08 10:02:46 -0800 |
commit | ec133e749db27536d8d3f133faa4c9291a249795 (patch) | |
tree | 995f4b5a22fe14e244fd9a43d64df3e1dc82dd12 /src | |
parent | dcf096ddf869883e623765882b1a6d8df971202b (diff) | |
download | cpuinfo-ec133e749db27536d8d3f133faa4c9291a249795.tar.gz |
Fix bug of misdetecting chipsets with partially matched signatures
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/linux/chipset.c | 8 |
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; } |