From patchwork Wed Jan 14 15:20:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Blaschka X-Patchwork-Id: 428995 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 023E014017A for ; Thu, 15 Jan 2015 02:21:24 +1100 (AEDT) Received: from localhost ([::1]:46757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPl4-0004rm-3A for incoming@patchwork.ozlabs.org; Wed, 14 Jan 2015 10:21:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPki-0004Qf-9x for qemu-devel@nongnu.org; Wed, 14 Jan 2015 10:21:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBPke-0006nc-8P for qemu-devel@nongnu.org; Wed, 14 Jan 2015 10:21:00 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:52569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPkd-0006n4-UA for qemu-devel@nongnu.org; Wed, 14 Jan 2015 10:20:56 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Jan 2015 15:20:52 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Jan 2015 15:20:50 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id CEC1E2190041 for ; Wed, 14 Jan 2015 15:20:17 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t0EFKoBp57999572 for ; Wed, 14 Jan 2015 15:20:50 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t0EFKn5A018014 for ; Wed, 14 Jan 2015 08:20:49 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t0EFKncx018003; Wed, 14 Jan 2015 08:20:49 -0700 From: Frank Blaschka To: cornelia.huck@de.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com Date: Wed, 14 Jan 2015 16:20:47 +0100 Message-Id: <1421248847-24237-1-git-send-email-blaschka@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15011415-0041-0000-0000-000002E488C9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.107 Cc: Frank Blaschka , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] s390x/pci: fix 2 bugs found by coverity X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Frank Blaschka Reviewed-by: Thomas Huth Reviewed-by: Thomas Huth Signed-off-by: Frank Blaschka Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-bus.c | 1 + hw/s390x/s390-pci-inst.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 1201b8d..546dcf1 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -192,6 +192,7 @@ static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh, object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL)); if (!s) { + g_free(sei_cont); return; } diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 5ea13e5..5596679 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -787,7 +787,7 @@ int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba) data = (pbdev->isc << 28) | (pbdev->noi << 16) | (pbdev->routes.adapter.ind_offset << 8) | (pbdev->sum << 7) | pbdev->routes.adapter.summary_offset; - stw_p(&fib.data, data); + stl_p(&fib.data, data); if (pbdev->fh >> ENABLE_BIT_OFFSET) { fib.fc |= 0x80;