net/virtio-user: fix device init in legacy-mem mode
authorXiao Wang <xiao.w.wang@intel.com>
Thu, 17 May 2018 07:35:25 +0000 (15:35 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 17 May 2018 10:29:05 +0000 (12:29 +0200)
commit88e5469ff800fed3462721769894cc13b248d417
tree0e1b663a85b5e251581ac97983e525fdbdcbdc0a
parent0230e058e99cf74428232e3904f700407027a0e9
net/virtio-user: fix device init in legacy-mem mode

In legacy-mem mode, memory event callback registering is not supported,
we should not return error in dev_init on this case.

Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")

Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_user/virtio_user_dev.c