From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id A4BF82B89 for ; Wed, 26 Jul 2017 13:52:36 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id c184so79335366wmd.0 for ; Wed, 26 Jul 2017 04:52:36 -0700 (PDT) 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; bh=d1tweGIES/uzlabjRGKo5OtLhMTEA1HBSu2H0HfPI0s=; b=ZDt+G5/C/IJGPfcEsiBUXhk7DcC+oz9NqR5sFtvt284lsxGudKsy1G7e2+SODmJukZ FvYGkp6MTFckjUgedbg0F3VU36imktyVo5uq1bn93Qiv+1anKgnbs8Sro7PUVTCoYkQw S55n0ipon9g/YHGB9xk+ldNZH7iEfGFckZEl5NFVYu6FK3EDqKWxnajFLZS2cZ8KSJVB orLlYfPimd4xPSGHbcmj1+fAVZenpR5WicaLFodmvkbDkdxJVciMP9R1ImNRbnG3fHME Y6rLOxQJTSzDsdYulpvA6uFX/ZABVYVasRfzmuoowWPABQBhpMMgZc32Y0RQQXP2ceNJ S2UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d1tweGIES/uzlabjRGKo5OtLhMTEA1HBSu2H0HfPI0s=; b=F+snD3rpNhqFbJoFH/gYaF8FovUxPyD8o1m/fUvqvZd3eGPthebDAgevHwSZJ9qYMP VmPMsWb3gmkhm7/CZxYqptsWpyPNxwt5YqVGOG2vTO9GQaIKbnhWAw1ZiaGfvRZAuH7s FLP9lx6Fo+23VfWC5lZgPUPPcqO+dg1cSbqNoxJAs7rVg3nNTLcd+ZrAECm5GxG0sWSe cDjWRECfsRLIQmSeBGqKxn48gLm12eEqS/9cfJQenBng4cmK3LC4OhTa0vC/Q7ewdvLy 8+zZpoDEp8JaLoqadF2kBMhpeOA3ncq1v9Rvx1Bwj2+5JP7CSuJZVXHaYQg2pe5w9B98 mr4Q== X-Gm-Message-State: AIVw113VITnWgHCSwCXH9xdAvyuFLEIQVCnZkaYBGk1VazqkEZSyvDJR H6uMTyQhPaCiteCldx4= X-Received: by 10.28.214.133 with SMTP id n127mr543242wmg.16.1501069955698; Wed, 26 Jul 2017 04:52:35 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id q10sm21692219wrb.3.2017.07.26.04.52.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 04:52:34 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , stable@dpdk.org, Jan Blunck Date: Wed, 26 Jul 2017 13:52:22 +0200 Message-Id: <3505500ec4b4a452528da1eb2076e11bdc22068c.1501069907.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] dev: fix dev_attach proceeding with vdev on success X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 11:52:36 -0000 When rte_eal_hotplug_add() successfully probe a device, the return value is zero. The check afterward only returns on error different from -EINVAL. It should return also on success, as there is no need to attempt probing the device with vdev. Fixes: 0bba9e605048 ("eal: use new hotplug API in attach") Cc: stable@dpdk.org Cc: Jan Blunck Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index e10b9fd..d74f978 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -74,7 +74,7 @@ int rte_eal_dev_attach(const char *name, const char *devargs) } ret = rte_eal_hotplug_add("pci", name, devargs); - if (ret && ret != -EINVAL) + if (ret != -EINVAL) return ret; /* -- 2.1.4