vhost-net: do not crash if backend is not present
commit72b65f922b7b925ed67847017dcd0539e49d925f
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 6 Jun 2016 16:45:04 +0000 (6 18:45 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 17 Jun 2016 00:28:03 +0000 (17 03:28 +0300)
treeef130b6895d5a7af696656a9fb5cc26bd5bdbcec
parent0d572afd5266d1d67d132d06ea45d7246bcd6105
vhost-net: do not crash if backend is not present

Do not crash when backend is not present while enabling the ring. A
following patch will save the enabled state so it can be restored once
the backend is started.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/vhost_net.c