Skip to content

Commit eceb6e1

Browse files
likunyurbonzini
authored andcommitted
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 <[email protected]> Signed-off-by: Li kunyu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 2824913 commit eceb6e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virt/kvm/kvm_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4380,7 +4380,7 @@ void kvm_unregister_device_ops(u32 type)
43804380
static int kvm_ioctl_create_device(struct kvm *kvm,
43814381
struct kvm_create_device *cd)
43824382
{
4383-
const struct kvm_device_ops *ops = NULL;
4383+
const struct kvm_device_ops *ops;
43844384
struct kvm_device *dev;
43854385
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
43864386
int type;

0 commit comments

Comments
 (0)