From patchwork Sun Dec 17 21:27:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 10117923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EAAE860327 for ; Sun, 17 Dec 2017 21:43:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB92F28757 for ; Sun, 17 Dec 2017 21:43:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF0BD28A90; Sun, 17 Dec 2017 21:43:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5B0E328757 for ; Sun, 17 Dec 2017 21:43:51 +0000 (UTC) Received: from localhost ([::1]:55649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQgis-00045r-KQ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 Dec 2017 16:43:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQgcw-0007Ej-PV for qemu-devel@nongnu.org; Sun, 17 Dec 2017 16:37:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQgct-00014w-Hl for qemu-devel@nongnu.org; Sun, 17 Dec 2017 16:37:42 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:32917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQgct-00014I-9p; Sun, 17 Dec 2017 16:37:39 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B4D3941172; Mon, 18 Dec 2017 00:28:08 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 99BC0CB5; Mon, 18 Dec 2017 00:25:45 +0300 (MSK) Received: (nullmailer pid 30897 invoked by uid 1000); Sun, 17 Dec 2017 21:28:08 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 18 Dec 2017 00:27:12 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 07/61] mmap(2) returns MAP_FAILED, not NULL, on failure 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: qemu-trivial@nongnu.org, Michael McConville , Michael Tokarev Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Michael McConville Signed-off-by: Michael McConville Reviewed-by: John Snow Signed-off-by: Michael Tokarev --- hw/i386/xen/xen-mapcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index baab93b614..efa35dc6e0 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -199,7 +199,7 @@ static void xen_remap_bucket(MapCacheEntry *entry, */ vaddr_base = mmap(vaddr, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); - if (vaddr_base == NULL) { + if (vaddr_base == MAP_FAILED) { perror("mmap"); exit(-1); }