[PATCH 2/2] bus/platform: do not allow adding existing device
Tomasz Duszynski
tduszynski at marvell.com
Thu Mar 16 10:41:33 CET 2023
Do not allow adding the same device multiple times.
Coverity issue: 383663
Fixes: 17c839f74da3 ("bus: add platform bus")
Signed-off-by: Tomasz Duszynski <tduszynski at 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
More information about the dev
mailing list