e1000e: fix incorrect access to pointer
PATCH 1/1 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 <[email protected]>
--- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/net/e1000e_core.c +2 -2
@@ -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; }
Signature · 1 line
2.7.4
Jason Wang
AppliedQuoted 22 lines · Paolo Bonzini
This is not dereferencing the pointer, and instead checking only the value of the pointer.
Signed-off-by Paolo Bonzini <[email protected]>--- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/net/e1000e_core.c +1
-1@@ -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; }
hw/net/e1000e_core.c e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) · line 328
Quoted 8 lines
hw/net/e1000e_core.c +1
-1@@ -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; }
Applied to -net. Thanks