aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi zeming <[email protected]>2023-08-17 08:26:31 +0800
committerSean Christopherson <[email protected]>2023-08-17 11:35:28 -0700
commit392a53246257a9f89ef421b60af62056ce374285 (patch)
tree5f8b6ac674d6f7b025b386f5ee1c54c62e6138eb
parent7b0151caf73a656b75b550e361648430233455a0 (diff)
x86: kvm: x86: Remove unnecessary initial values of variables
bitmap and khz is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index d293adc05145..c91de9897e32 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6512,7 +6512,7 @@ static void kvm_free_msr_filter(struct kvm_x86_msr_filter *msr_filter)
static int kvm_add_msr_filter(struct kvm_x86_msr_filter *msr_filter,
struct kvm_msr_filter_range *user_range)
{
- unsigned long *bitmap = NULL;
+ unsigned long *bitmap;
size_t bitmap_size;
if (!user_range->nmsrs)
@@ -9146,7 +9146,7 @@ static int kvmclock_cpu_down_prep(unsigned int cpu)
static void tsc_khz_changed(void *data)
{
struct cpufreq_freqs *freq = data;
- unsigned long khz = 0;
+ unsigned long khz;
WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_CONSTANT_TSC));