Re: [PATCH] KVM: irqchip: KVM: Reduce allocation overhead in kvm_set_irq_routing()

kernel test robot
2025-12-24T17:36:59Z

config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251224/202512241858.vP31c8Cu-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251224/202512241858.vP31c8Cu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512241858.vP31c8Cu-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/x86/kvm/../../../virt/kvm/irqchip.c:190:6: warning: variable 'r' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
190 | if (!e)
| ^~
arch/x86/kvm/../../../virt/kvm/irqchip.c:233:9: note: uninitialized use occurs here
233 | return r;
| ^
arch/x86/kvm/../../../virt/kvm/irqchip.c:190:2: note: remove the 'if' if its condition is always false
190 | if (!e)
| ^~~~~~~
191 | goto out;
| ~~~~~~~~
arch/x86/kvm/../../../virt/kvm/irqchip.c:176:7: note: initialize the variable 'r' to silence this warning
176 | int r;
| ^
| = 0
1 warning generated.

vim +190 arch/x86/kvm/../../../virt/kvm/irqchip.c