summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorLi kunyu <kunyu@nfschina.com>2022-08-19 10:15:35 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-08-19 04:05:43 -0400
commiteceb6e1d530046f964b0e371d4fad02a5b6b42d1 (patch)
tree19f8c00a90a03ee263c2bab281f7d1b00fcc0951 /virt
parent2824913976a851f049bc8ab929b5c8d3b6ee269b (diff)
downloadlinux-rpi-eceb6e1d530046f964b0e371d4fad02a5b6b42d1.tar.gz
linux-rpi-eceb6e1d530046f964b0e371d4fad02a5b6b42d1.tar.bz2
linux-rpi-eceb6e1d530046f964b0e371d4fad02a5b6b42d1.zip
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')
-rw-r--r--virt/kvm/kvm_main.c2
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;