diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2024-06-21 14:11:14 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-08-20 00:28:24 +0200 |
commit | ec276edb384689caae03c8cb53dc6833304df02f (patch) | |
tree | d8644a4a99418b0658aad6c484ea66c1de2a8bff /hw | |
parent | d762016d51de1d8a11196d27c0aade9881fc26f0 (diff) |
hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection
>>> CID 1547264: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "ipi" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Resolves: Coverity CID 1547264
Link: https://lore.kernel.org/qemu-devel/752417ad-ab72-4fed-8d1f-af41f15bc225@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240621-loongson3-ipi-follow-v2-2-848eafcbb67e@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/mips/loongson3_virt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 27a85e3614..2067b4fecb 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -574,7 +574,7 @@ static void mips_loongson3_virt_init(MachineState *machine) cpu_mips_clock_init(cpu); qemu_register_reset(main_cpu_reset, cpu); - if (ipi) { + if (!kvm_enabled()) { hwaddr base = ((hwaddr)node << 44) + virt_memmap[VIRT_IPI].base; base += core * 0x100; qdev_connect_gpio_out(ipi, i, cpu->env.irq[6]); |