x86/hpet: Fix return value of hpet_setup()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Dec 2020 17:51:23 +0000 (17:51 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 31 Dec 2020 16:19:00 +0000 (16:19 +0000)
commit83736c567d6b64dbce98f251ca72e7870f556421
treeff6449810c18ee5954f9539e03236c829dbb6020
parent98d4d6d8a6329ea3a8dcf8aab65acdd70c6397fc
x86/hpet: Fix return value of hpet_setup()

hpet_setup() is idempotent if the rate has already been calculated, and
returns the cached value.  However, this only works correctly when the return
statements are identical.

Use a sensibly named local variable, rather than a dead one with a bad name.

Fixes: a60bb68219 ("x86/time: reduce rounding errors in calculations")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hpet.c