From: Paolo Bonzini Date: Wed, 22 Oct 2025 12:54:30 +0000 (+0200) Subject: accel/mshv: use return value of handle_pio_str_read X-Git-Tag: v10.2.0-rc1~40^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1557adc82698416bc68033765cfffb0a0b91c6bf;p=thirdparty%2Fqemu.git accel/mshv: use return value of handle_pio_str_read Coverity complains because we assign to ret here but then never read it again before we overwrite it with the call to set_x64_registers(). Analyzed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c index 1f7b9cb37e..1c3db02188 100644 --- a/target/i386/mshv/mshv-cpu.c +++ b/target/i386/mshv/mshv-cpu.c @@ -1489,6 +1489,10 @@ static int handle_pio_str(CPUState *cpu, hv_x64_io_port_intercept_message *info) reg_values[0] = info->rsi; } else { ret = handle_pio_str_read(cpu, info, repeat, port, direction_flag); + if (ret < 0) { + error_report("Failed to handle pio str read"); + return -1; + } reg_names[0] = HV_X64_REGISTER_RDI; reg_values[0] = info->rdi; }