aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/cpu.c')
-rw-r--r--target/i386/cpu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 685ca36640..58a05ec870 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2034,10 +2034,9 @@ static void x86_cpu_parse_featurestr(const char *typename, char *features,
/* Special case: */
if (!strcmp(name, "tsc-freq")) {
int64_t tsc_freq;
- char *err;
- tsc_freq = qemu_strtosz_metric(val, &err);
- if (tsc_freq < 0 || *err) {
+ tsc_freq = qemu_strtosz_metric(val, NULL);
+ if (tsc_freq < 0) {
error_setg(errp, "bad numerical value %s", val);
return;
}