qdev_monitor: Simplify error handling in qdev_device_add()
Instead of doing the clean-ups on errors multiple times, introduce a jump label at the end of the function that can be used by all error paths that need this cleanup. Suggested-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NThomas Huth <thuth@redhat.com> Message-Id: <1509617407-21191-2-git-send-email-thuth@redhat.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Showing
想要评论请 注册 或 登录