« Previous | Next » 

Revision 925fe64a

ID925fe64ae7b487fdb7bd56fcab63e2f87653c226

Added by Alex Williamson almost 14 years ago

pci: cleanly backout of pci_qdev_init()

If the init function of a device fails, as might happen with device
assignment, we never undo the work done by do_pci_register_device().
This not only causes a bit of a memory leak, but also leaves a bogus
pointer in the bus devices array that can cause a segfault or
garbage data from 'info pci'.

Signed-off-by: Alex Williamson <>
Signed-off-by: Michael S. Tsirkin <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences