Skip to content

Commit

Permalink
KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_dev…
Browse files Browse the repository at this point in the history
…ice()

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]>
  • Loading branch information
likunyur authored and bonzini committed Aug 19, 2022
1 parent 2824913 commit eceb6e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eceb6e1

Please sign in to comment.