diff options
author | Li kunyu <kunyu@nfschina.com> | 2022-08-19 05:15:35 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-08-19 11:05:43 +0300 |
commit | eceb6e1d530046f964b0e371d4fad02a5b6b42d1 (patch) | |
tree | 19f8c00a90a03ee263c2bab281f7d1b00fcc0951 /virt/kvm | |
parent | 2824913976a851f049bc8ab929b5c8d3b6ee269b (diff) | |
download | linux-eceb6e1d530046f964b0e371d4fad02a5b6b42d1.tar.xz |
KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device()
The variable is initialized but it is only used after its assignment.
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Li kunyu <kunyu@nfschina.com>
Message-Id: <20220819021535.483702-1-kunyu@nfschina.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index c916c4c8801c..584a5bab3af3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -4380,7 +4380,7 @@ void kvm_unregister_device_ops(u32 type) static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) { - const struct kvm_device_ops *ops = NULL; + const struct kvm_device_ops *ops; struct kvm_device *dev; bool test = cd->flags & KVM_CREATE_DEVICE_TEST; int type; |