qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer
Date: Mon, 18 Jul 2016 13:59:17 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0



On 2016年07月15日 16:44, Paolo Bonzini wrote:
This is not dereferencing the pointer, and instead checking only
the value of the pointer.

Signed-off-by: Paolo Bonzini <address@hidden>
---
  hw/net/e1000e_core.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 6050d8b..badb1fe 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;
      }

Applied to -net. Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]