summary refs log tree commit diff stats
path: root/net/vhost-user.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2025-07-17 17:08:01 +0200
committerJason Wang <jasowang@redhat.com>2025-07-21 10:22:41 +0800
commit37c8b208cc3161c2bcd4e2ff1e1077a64872ced3 (patch)
tree814052ebb9fa871e4a4da30aa612899fa80bba33 /net/vhost-user.c
parent2ed74e3c005f236acbf7d85d396a653bfb004a17 (diff)
downloadfocaccia-qemu-37c8b208cc3161c2bcd4e2ff1e1077a64872ced3.tar.gz
focaccia-qemu-37c8b208cc3161c2bcd4e2ff1e1077a64872ced3.zip
net/vhost-user: Remove unused "err" from net_vhost_user_event() (CID 1612372)
The "err" variable was declared but never used within the
net_vhost_user_event() function. This resulted in a dead code
warning (CID 1612372) from Coverity.

Remove the unused variable and the associated error block
to resolve the issue.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/vhost-user.c')
-rw-r--r--net/vhost-user.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 1c3b8b36f3..cec83e925f 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -329,7 +329,6 @@ static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
     NetClientState *ncs[MAX_QUEUE_NUM];
     NetVhostUserState *s;
     Chardev *chr;
-    Error *err = NULL;
     int queues;
 
     queues = qemu_find_net_clients_except(name, ncs,
@@ -375,10 +374,6 @@ static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
         /* Ignore */
         break;
     }
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
 static int net_vhost_user_init(NetClientState *peer, const char *device,