From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 3DF73C34E for ; Fri, 5 Feb 2016 18:55:53 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id 128so80984460wmz.1 for ; Fri, 05 Feb 2016 09:55:53 -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=ktxRkeMR6TUGWd9cH11LLfecaWaSYHYonI8Ocw9ws+g=; b=rFSjscBV+pPJMRO1MxMRrZGVFsOf80jA7fWZtj7lrhkJJQPh5rwr874u+Vt4lt/7nc tiF8iex76+NZe2pmDT45dUXHUSyBMQzycCCQOSwC1ZhOWqBhfxxdEpc+iHCYfTXxvAkX x3nzBplaeuNDyK3kLuBAh1K/Tll6zuHgH2sMCJzWVgOYwg1h3Sew4Xq2yzFf0A1pxAhd dW17JrwwTvVxCNxZGobrX4Z+S+ZKKN5bnwCE1Gs9DPUjxfp/LEFKITH9SukYXwzHl/gj GN5WULUFvx1tVWmZXifMqizObSdQqTosJX1aoSyHwduoCQvpH82S5hbneDGiXBG3Msq9 tTlw== 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=ktxRkeMR6TUGWd9cH11LLfecaWaSYHYonI8Ocw9ws+g=; b=ZgnsWUb5CTbg18wNQT+iTNjLu2Ng5JVyhQiGF/yQ4D/D9X1kniBoeF4xCSirEhh3Y+ JtIn2a56Pc3W1DHcPGoVRGWFalGZBehJ+Gv4ESpkAlkt4fKMarTTZNkTfJx24kEguEDA 6wj/JnKQT49yWS7pK7XySaBjWcQidfKshtHy/f51s3hknP7iVwI6fSSg1V9FtJ0UPmDJ K7UNuues3wpXd1dDVlUUB/Dv9WWLLT+DouVqrQgvSqgcfHkWmnz9qEAn1IzU380vzkTX 6flr1ZJOw4wMYOnJDTKbYTw4PIVSqLhCsjlFDhNdjyFPidawseYdppRHYA9h1qJntvQM jXDQ== X-Gm-Message-State: AG10YORee8dwzVxvR8VJJfsxu2YJUvsuNbsRwxafX4gLmdi9qMxQBj0+0nQRCsUlIfos485D X-Received: by 10.28.145.194 with SMTP id t185mr18690633wmd.32.1454694953137; Fri, 05 Feb 2016 09:55:53 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id gt7sm16942517wjc.1.2016.02.05.09.55.52 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Feb 2016 09:55:52 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Fri, 5 Feb 2016 18:55:43 +0100 Message-Id: <1454694945-18040-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454694945-18040-1-git-send-email-david.marchand@6wind.com> References: <1454694945-18040-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 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: Fri, 05 Feb 2016 17:55:53 -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 --- 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 cd8b0ae..b1610dd 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