mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
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>
This commit is contained in:
parent
2824913976
commit
eceb6e1d53
@ -4380,7 +4380,7 @@ void kvm_unregister_device_ops(u32 type)
|
|||||||
static int kvm_ioctl_create_device(struct kvm *kvm,
|
static int kvm_ioctl_create_device(struct kvm *kvm,
|
||||||
struct kvm_create_device *cd)
|
struct kvm_create_device *cd)
|
||||||
{
|
{
|
||||||
const struct kvm_device_ops *ops = NULL;
|
const struct kvm_device_ops *ops;
|
||||||
struct kvm_device *dev;
|
struct kvm_device *dev;
|
||||||
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
|
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
|
||||||
int type;
|
int type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user