]> git.ipfire.org Git - thirdparty/iproute2.git/commit
rdma: stat: initialize ret in stat_qp_show_parse_cb()
authorAndrea Claudi <aclaudi@redhat.com>
Tue, 13 Apr 2021 22:50:57 +0000 (00:50 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 14 Apr 2021 02:16:55 +0000 (19:16 -0700)
commit16ce4d23661aee6cecfea0a8ded0ce11ef3a3ecd
tree9286300ea37dc8791abe2c2b76389d0ec9bb78ae
parent6a2c51da993ab9f8b385ee2bf13814f8e8000ce5
rdma: stat: initialize ret in stat_qp_show_parse_cb()

In the unlikely case in which the mnl_attr_for_each_nested() cycle is
not executed, this function return an uninitialized value.

Fix this initializing ret to 0.

Fixes: 5937552b42e4 ("rdma: Add "stat qp show" support")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
rdma/stat.c