From: Paolo Bonzini Date: Fri, 15 Jul 2016 08:44:38 +0000 (+0200) Subject: e1000e: fix incorrect access to pointer X-Git-Tag: v2.7.0-rc0~21^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ac6c07f4288b0a563310fad0cdabb3a47c85607;p=thirdparty%2Fqemu.git 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 Signed-off-by: Jason Wang --- diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 6050d8b7f88..badb1feb7dd 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; }