From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93E0541EAF; Thu, 16 Mar 2023 10:42:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6690B42D16; Thu, 16 Mar 2023 10:42:19 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1A45140FDF for ; Thu, 16 Mar 2023 10:42:16 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32G7kfC2005959 for ; Thu, 16 Mar 2023 02:42:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=NWi/4zrphVHkRA0+eLbGEgPXDS6/YJfFwPAuSCi7ti0=; b=LKqwsnGiLuOqDetzU7EmX4xOtfLa0v7l5Qx3Y2dXtWOfQeb1kuwbJ9f+2I+a+oLGrTjD OkDQQ8YSudp9aJqc8ysNY14JWM0P3jBfBRVB6b8oHqS0VR+tCGa3vJ/3FUDIgZE5OZIx zMZjCpO0KTTRV2XRcYM33zzcioWREcE6MjKI6E3HKLApscZMm4YURiboptWywQ8uVgKl Uoq4D9kdFBQiKOZEYmXqeCFDfF88qejUhaVP307CsAVkAWtRI3pJkKOAk90hV+pF6oCX rN6Bo19z3tWrDphPV7Pt5YJ0dIEK8idbJMoozxlFY/C8VjD7r4VWKKLa9Zr6yL5UmXE6 gQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3pbxq2rh1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 Mar 2023 02:42:16 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 16 Mar 2023 02:42:14 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Thu, 16 Mar 2023 02:42:14 -0700 Received: from cavium-DT10.. (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id B62D23F7045; Thu, 16 Mar 2023 02:42:13 -0700 (PDT) From: Tomasz Duszynski To: , Tomasz Duszynski Subject: [PATCH 2/2] bus/platform: do not allow adding existing device Date: Thu, 16 Mar 2023 10:41:33 +0100 Message-ID: <20230316094133.237641-2-tduszynski@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230316094133.237641-1-tduszynski@marvell.com> References: <20230316094133.237641-1-tduszynski@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 6HeqyJ_UywtLDEr95nbnD271zDS4i6fO X-Proofpoint-ORIG-GUID: 6HeqyJ_UywtLDEr95nbnD271zDS4i6fO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-16_06,2023-03-15_01,2023-02-09_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not allow adding the same device multiple times. Coverity issue: 383663 Fixes: 17c839f74da3 ("bus: add platform bus") Signed-off-by: Tomasz Duszynski --- drivers/bus/platform/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c index a2faacdf18..d4b53f6fbc 100644 --- a/drivers/bus/platform/platform.c +++ b/drivers/bus/platform/platform.c @@ -103,6 +103,7 @@ dev_add(const char *dev_name) rte_devargs_remove(pdev->device.devargs); free(pdev); + return -EEXIST; } } -- 2.34.1