- ui/vnc.c: Fixed a deadlock bug. - hw/i386: Fix comment style in topology.h - migration/multifd: Remove unnecessary usage of local Error - linux-user: fix sockaddr_in6 endianness - vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del() - iotests: fix 194: filter out racy postcopy-active event - tests/avocado: fix waiting for vm shutdown in replay_linux - ui/vnc: fix debug output for invalid audio message Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 2b6068aae3fe18cd0c948c22b4531b344c3e2b6c)
62 lines
2.1 KiB
Diff
62 lines
2.1 KiB
Diff
From 8046e5c70d22eba8a1ca71ba622fa8b8c74c355f Mon Sep 17 00:00:00 2001
|
|
From: qihao <qihao_yewu@cmss.chinamobile.com>
|
|
Date: Tue, 16 Jan 2024 17:52:03 +0800
|
|
Subject: [PATCH] migration/multifd: Remove unnecessary usage of local Error
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cheery-pick from 3fc58efa938338a82e4d5c0c031e7e9c98e9544f
|
|
|
|
According to Error API, usage of ERRP_GUARD() or a local Error instead
|
|
of errp is needed if errp is passed to void functions, where it is later
|
|
dereferenced to see if an error occurred.
|
|
|
|
There are several places in multifd.c that use local Error although it
|
|
is not needed. Change these places to use errp directly.
|
|
|
|
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
Link: https://lore.kernel.org/r/20231231093016.14204-12-avihaih@nvidia.com
|
|
Signed-off-by: Peter Xu <peterx@redhat.com>
|
|
Signed-off-by: qihao_yewu <qihao_yewu@cmss.chinamobile.com>
|
|
---
|
|
migration/multifd.c | 8 ++------
|
|
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/migration/multifd.c b/migration/multifd.c
|
|
index 0d3f66537c..4befde5cad 100644
|
|
--- a/migration/multifd.c
|
|
+++ b/migration/multifd.c
|
|
@@ -929,12 +929,10 @@ int multifd_save_setup(Error **errp)
|
|
|
|
for (i = 0; i < thread_count; i++) {
|
|
MultiFDSendParams *p = &multifd_send_state->params[i];
|
|
- Error *local_err = NULL;
|
|
int ret;
|
|
|
|
- ret = multifd_send_state->ops->send_setup(p, &local_err);
|
|
+ ret = multifd_send_state->ops->send_setup(p, errp);
|
|
if (ret) {
|
|
- error_propagate(errp, local_err);
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -1167,12 +1165,10 @@ int multifd_load_setup(Error **errp)
|
|
|
|
for (i = 0; i < thread_count; i++) {
|
|
MultiFDRecvParams *p = &multifd_recv_state->params[i];
|
|
- Error *local_err = NULL;
|
|
int ret;
|
|
|
|
- ret = multifd_recv_state->ops->recv_setup(p, &local_err);
|
|
+ ret = multifd_recv_state->ops->recv_setup(p, errp);
|
|
if (ret) {
|
|
- error_propagate(errp, local_err);
|
|
return ret;
|
|
}
|
|
}
|
|
--
|
|
2.27.0
|
|
|