aboutsummaryrefslogtreecommitdiff
path: root/hw/net/e1000e.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/e1000e.c')
-rw-r--r--hw/net/e1000e.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 0e0a1dc888..08f3626a39 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -374,7 +374,7 @@ e1000e_add_pm_capability(PCIDevice *pdev, uint8_t offset, uint16_t pmc)
{
int ret = pci_add_capability(pdev, PCI_CAP_ID_PM, offset, PCI_PM_SIZEOF);
- if (ret >= 0) {
+ if (ret > 0) {
pci_set_word(pdev->config + offset + PCI_PM_PMC,
PCI_PM_CAP_VER_1_1 |
pmc);