Message ID | 1459350849-31989-5-git-send-email-i.maximets@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/net/net.c b/net/net.c index 3b5a142..6f6a8ce 100644 --- a/net/net.c +++ b/net/net.c @@ -1385,9 +1385,10 @@ void qmp_set_link(const char *name, bool up, Error **errp) for (i = 0; i < queues; i++) { ncs[i]->peer->link_down = !up; } - } - if (nc->peer->info->link_status_changed) { - nc->peer->info->link_status_changed(nc->peer); + + if (nc->peer->info->link_status_changed) { + nc->peer->info->link_status_changed(nc->peer); + } } } }
No need to notify nc->peer if nothing changed. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> --- net/net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)