From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 736DAC2FE for ; Tue, 16 Feb 2016 21:37:15 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id g62so127476827wme.1 for ; Tue, 16 Feb 2016 12:37:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E+Y9MhMD2zmdOp1lVor7LRcBKL4Y0xt8vk96rx6UheU=; b=TcsIoUcRtiw5DU0uwuT3h3PepWd6aGopOVFRbJVBMityBaJn0ORZDuzDO5H+Q0QOdC WOEzF6Sp6x1Y2HxGmdhlJ85jvDhsJmm7JIGNKIfwOrQY3kEI8FdRV+33KbkEAKQyrV9b XsmjYu19wkdDUfh8s8jKcyLJdgso1PkqL0CD0ebmMpIs6nrYsKpnPBLeeB4XeNA91gRb JNDkNUcAwr4oSeUeIDYMyx7dRbYyttkQ8F/+iL1I4kPyEuL8rhwJaSeyRfKPRE4ta0qe bz/Quk9axelfphvD6l19AxS9okHnhzVAPFVQiraW/8fsVoUdSf+uR9LCgtDnU5/DXCu5 OzaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E+Y9MhMD2zmdOp1lVor7LRcBKL4Y0xt8vk96rx6UheU=; b=NUd3N22r289eibq/G5eQZ7sSNThC7r9KCX7MyRseFWKe8T2hiQtHSl3Jc2QHo4Bka+ ABe1HJxSubozPSmcqOzZ9mTyHaxr23CgPQmhcxi+OQhgKVyTK2IV2bS70W3DzH1ckIzr eOdmtQnLWv4JRPJE1pr7upRp06Dondc8HGvL5n290CzpGHLKh8E38hGqIUuVR7pZzy0l Bcan4WyZoKXdsxtASfCq3F3zyG2eIQAysVzHTd/Q+U3TvLB1D0RQsZCNhpwdvXCO5gUX wVMwDVNz45atm6dC4wFzRvUZ7rUeK6/uFyjTRjODthWUr1eQUHcOwyGSiDnlkndSU+Hy ibVw== X-Gm-Message-State: AG10YOR/6hoMTkLV8SGMVwYUV9IICR/Q+IwyJNBa/nGKvaBmbfApd85q4KgsdyObF3nohsj9 X-Received: by 10.28.5.77 with SMTP id 74mr22686255wmf.62.1455655035283; Tue, 16 Feb 2016 12:37:15 -0800 (PST) Received: from gloops.dev.6wind.com (guy78-1-82-235-116-147.fbx.proxad.net. [82.235.116.147]) by smtp.gmail.com with ESMTPSA id lc3sm31813646wjb.7.2016.02.16.12.37.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 16 Feb 2016 12:37:14 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Tue, 16 Feb 2016 21:37:02 +0100 Message-Id: <1455655024-5164-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455655024-5164-1-git-send-email-david.marchand@6wind.com> References: <1455542666-28895-1-git-send-email-david.marchand@6wind.com> <1455655024-5164-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v4 2/4] virtio: fix incorrect check when mapping pci resources X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 20:37:15 -0000 According to the api, rte_eal_pci_map_device is only successful when returning 0. Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Signed-off-by: David Marchand Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 762e91c..b4d4476 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -795,7 +795,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) struct virtio_pci_cap cap; int ret; - if (rte_eal_pci_map_device(dev) < 0) { + if (rte_eal_pci_map_device(dev)) { PMD_INIT_LOG(DEBUG, "failed to map pci device!"); return -1; } -- 1.9.1