From patchwork Tue Jul 19 02:38:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 649893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rtkmh3TYnz9sBM for ; Tue, 19 Jul 2016 12:40:36 +1000 (AEST) Received: from localhost ([::1]:51529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKxW-0001Eh-2g for incoming@patchwork.ozlabs.org; Mon, 18 Jul 2016 22:40:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw6-00004t-2b for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPKw3-0007Uq-Aw for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw3-0007Um-5O for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:03 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA9597D0E3; Tue, 19 Jul 2016 02:39:02 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (vpn1-6-66.pek2.redhat.com [10.72.6.66]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6J2cuq7030481; Mon, 18 Jul 2016 22:39:00 -0400 From: Jason Wang To: peter.maydell@linaro.org, qemu-devel@nongnu.org Date: Tue, 19 Jul 2016 10:38:50 +0800 Message-Id: <1468895935-23097-2-git-send-email-jasowang@redhat.com> In-Reply-To: <1468895935-23097-1-git-send-email-jasowang@redhat.com> References: <1468895935-23097-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 19 Jul 2016 02:39:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL V2 1/6] e1000e: fix incorrect access to pointer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Jason Wang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini 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 --- 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; }