76b1e4cec7
Make sure find avalid device id before allocating virtio_net, if not, return directly. It may avoid allocating and freeing virtio_net when there is not valid device id. Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>