]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
vdpa: propagate error from cmd_dev_vstats_show()
authorAndrea Claudi <aclaudi@redhat.com>
Mon, 29 May 2023 21:41:41 +0000 (23:41 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 30 May 2023 19:25:13 +0000 (12:25 -0700)
Error potentially returned from mnlu_gen_socket_sndrcv() are propagated
for each and every invocation in vdpa. Let's do the same here.

Fixes: 6f97e9c9337b ("vdpa: Add support for reading vdpa device statistics")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
vdpa/vdpa.c

index 27647d73d4986b43337de028b177c69147e680d6..8bbe452c7b2cd078b1a4407bf3c37e921acdd57e 100644 (file)
@@ -986,7 +986,7 @@ static int cmd_dev_vstats_show(struct vdpa *vdpa, int argc, char **argv)
        pr_out_section_start(vdpa, "vstats");
        err = mnlu_gen_socket_sndrcv(&vdpa->nlg, nlh, cmd_dev_vstats_show_cb, vdpa);
        pr_out_section_end(vdpa);
-       return 0;
+       return err;
 }
 
 static int cmd_dev_vstats(struct vdpa *vdpa, int argc, char **argv)