From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 3C70F2B89 for ; Wed, 26 Jul 2017 13:52:36 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id t201so70261837wmt.1 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=mR0uvBAeT9wVTknkDUZv+3VSOWovAiwDmjt69uqLcaWaci9ZRgZ9HlUykvJCisH1F2 mALsFRMTgFIDwxnRsGCItvVozXw/2ggoigPNFDC2XTfXdJuftWfmu8JpSPKQnZu6lqJk i06wI0H6rgI3/fO86C9GESMpHJqmWxFtIcYmzRgP8zY5BUwoYKBfv+Vv2KxT6NyGMIcy RX8mmTQi0knJVlAFdhEchTOfowB/RvpMRnysg2AVzRUSR6sVDbdpOQRdQUaIcUQcdDbK QNF6bxHf9UeuOkKzo8gZuEtpFirlSFnpB9073K9JgbRDpOFG/8MBn4RpiKrIQwvXBSL0 U3Qg== X-Gm-Message-State: AIVw113O0FfjXnrcC0/8HCGHnBFzYSAvQDM7naCt2d0oNrUDDDVfWXEJ PNQ70VS9Cc9a4wY4 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-stable] [PATCH] dev: fix dev_attach proceeding with vdev on success X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches 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