From: Tomasz Duszynski <tduszynski@marvell.com>
To: <dev@dpdk.org>, Tomasz Duszynski <tduszynski@marvell.com>
Subject: [PATCH 2/2] bus/platform: do not allow adding existing device
Date: Thu, 16 Mar 2023 10:41:33 +0100 [thread overview]
Message-ID: <20230316094133.237641-2-tduszynski@marvell.com> (raw)
In-Reply-To: <20230316094133.237641-1-tduszynski@marvell.com>
Do not allow adding the same device multiple times.
Coverity issue: 383663
Fixes: 17c839f74da3 ("bus: add platform bus")
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
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
next prev parent reply other threads:[~2023-03-16 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 9:41 [PATCH 1/2] bus/platform: fix resource names iteration Tomasz Duszynski
2023-03-16 9:41 ` Tomasz Duszynski [this message]
2023-03-16 16:52 ` [PATCH 2/2] bus/platform: do not allow adding existing device Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230316094133.237641-2-tduszynski@marvell.com \
--to=tduszynski@marvell.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.