summaryrefslogtreecommitdiff
path: root/hw/net/e1000e_core.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-15 10:44:38 +0200
committerJason Wang <jasowang@redhat.com>2016-07-18 16:16:20 +0800
commit1ac6c07f4288b0a563310fad0cdabb3a47c85607 (patch)
treec0a93b923adcb988bced89da1ae332866bf5cebf /hw/net/e1000e_core.c
parent6b92bbfe812746fe7841a24c24e6460f5359ce72 (diff)
e1000e: fix incorrect access to pointer
This is not dereferencing the pointer, and instead checking only the value of the pointer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/e1000e_core.c')
-rw-r--r--hw/net/e1000e_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 6050d8b7f8..badb1feb7d 100644
--- a/hw/net/e1000e_core.c
+++ b/hw/net/e1000e_core.c
@@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes)
/* Check if delayed RX interrupts disabled by client
or if there are causes that cannot be delayed */
- if ((rdtr == 0) || (causes != 0)) {
+ if ((rdtr == 0) || (*causes != 0)) {
return false;
}
@@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes)
*causes &= ~delayable_causes;
/* If there are causes that cannot be delayed */
- if (causes != 0) {
+ if (*causes != 0) {
return false;
}