Skip to content
Commit f2b44cde authored by weiping zhang's avatar weiping zhang Committed by Michael S. Tsirkin
Browse files

virtio: split device_register into device_initialize and device_add



In order to make caller do a simple cleanup, we split device_register
into device_initialize and device_add. device_initialize always succeeds,
so the caller can always use put_device when register_virtio_device faild.

Signed-off-by: default avatarweiping zhang <zhangweiping@didichuxing.com>
Suggested-by: default avatarCornelia Huck <cohuck@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
parent f6f93f75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment