Skip to content

Commit c0e9251

Browse files
bibo-maoKexyBiscuit
authored andcommitted
FROMGIT: LoongArch: KVM: Remove unnecessary local variable
Local variable device1 can be replaced with existing variable device, it makes code concise. Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]> (cherry picked from commit d42fd71 https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch-next) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 1e93925 commit c0e9251

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/loongarch/kvm/intc/eiointc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ static int kvm_eiointc_create(struct kvm_device *dev, u32 type)
989989
{
990990
int ret;
991991
struct loongarch_eiointc *s;
992-
struct kvm_io_device *device, *device1;
992+
struct kvm_io_device *device;
993993
struct kvm *kvm = dev->kvm;
994994

995995
/* eiointc has been created */
@@ -1017,10 +1017,10 @@ static int kvm_eiointc_create(struct kvm_device *dev, u32 type)
10171017
return ret;
10181018
}
10191019

1020-
device1 = &s->device_vext;
1021-
kvm_iodevice_init(device1, &kvm_eiointc_virt_ops);
1020+
device = &s->device_vext;
1021+
kvm_iodevice_init(device, &kvm_eiointc_virt_ops);
10221022
ret = kvm_io_bus_register_dev(kvm, KVM_IOCSR_BUS,
1023-
EIOINTC_VIRT_BASE, EIOINTC_VIRT_SIZE, device1);
1023+
EIOINTC_VIRT_BASE, EIOINTC_VIRT_SIZE, device);
10241024
if (ret < 0) {
10251025
kvm_io_bus_unregister_dev(kvm, KVM_IOCSR_BUS, &s->device);
10261026
kfree(s);

0 commit comments

Comments
 (0)