Commit eceb6e1d authored by Li kunyu's avatar Li kunyu Committed by Paolo Bonzini
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarLi kunyu <kunyu@nfschina.com>
Message-Id: <20220819021535.483702-1-kunyu@nfschina.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 28249139
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;