serial: fix multi-pci card error cleanup.
Put the number of serial ports into a local variable in multi_serial_pci_realize, then increment the port count (pci->ports) as we initialize the serial port cores. Now pci->ports always holds the number of successfully initialized ports and we can use multi_serial_pci_exit to properly cleanup the already initialized bits in case of a init failure. https://bugzilla.redhat.com/show_bug.cgi?id=970551Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Showing
想要评论请 注册 或 登录