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:Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <1509617407-21191-2-git-send-email-thuth@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
Loading
Please register or sign in to comment