diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 1a97b5c0f2..52a55f6a64 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -181,7 +181,7 @@ int vhost_register_driver(FAR struct vhost_driver *driver) list_for_every_entry(&g_vhost_bus.device, item, struct vhost_device_item_s, node) { - if (driver->device == item->device->id.device) + if (item->driver == NULL && driver->device == item->device->id.device) { /* If found the device in the device list, call driver probe, * if probe success, assign item->driver to indicate the device