Cao jin <[email protected]> writes: > usb_xhci_realize() corrects invalid values of property "intrs" > automatically, but the uncorrected value is passed to msi_init(), > which chokes on invalid values. Delay that until after the > correction. > > Resources allocated by usb_xhci_init() are leaked when msi_init() > fails. Fix by calling it after msi_init(). > > CC: Gerd Hoffmann <[email protected]> > CC: Markus Armbruster <[email protected]> > CC: Marcel Apfelbaum <[email protected]> > CC: Michael S. Tsirkin <[email protected]> > Signed-off-by: Cao jin <[email protected]> > --- > In previous rounds, usb_xhci_init() is moved too far from its original place, > which results the segfault(XHCIState->numports is initialized in this func), > now move it adjacent to msi_init code hunk.
Thanks for explaining what you changed. Reviewed-by: Markus Armbruster <[email protected]>
