aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2017-01-17 14:18:47 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-02-01 03:37:18 +0200
commit20729dbd0109b9d9065447dba354f10bcf78d0d6 (patch)
tree0af24b17a30a346c706327b14822468de410df58 /hw/pci
parent9348243687930bc54aa76d887dabb622922ea09f (diff)
hcd-xhci: check & correct param before using it
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 <kraxel@redhat.com> CC: Markus Armbruster <armbru@redhat.com> CC: Marcel Apfelbaum <marcel@redhat.com> CC: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
0 files changed, 0 insertions, 0 deletions