mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
pci: Fix the wrong assertion.
pci_add_capability returns a strictly positive value on success, correct asserts. Cc: dmitry@daynix.com Cc: jasowang@redhat.com Cc: kraxel@redhat.com Cc: alex.williamson@redhat.com Cc: armbru@redhat.com Cc: marcel@redhat.com Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
eacbc63211
commit
9a815774bb
4 changed files with 4 additions and 4 deletions
|
@ -571,7 +571,7 @@ static void e100_pci_reset(EEPRO100State * s)
|
|||
int cfg_offset = 0xdc;
|
||||
int r = pci_add_capability(&s->dev, PCI_CAP_ID_PM,
|
||||
cfg_offset, PCI_PM_SIZEOF);
|
||||
assert(r >= 0);
|
||||
assert(r > 0);
|
||||
pci_set_word(pci_conf + cfg_offset + PCI_PM_PMC, 0x7e21);
|
||||
#if 0 /* TODO: replace dummy code for power management emulation. */
|
||||
/* TODO: Power Management Control / Status. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue