[PATCH v4 04/25] dma/idxd: clear device at scan
David Marchand
david.marchand at redhat.com
Wed May 27 09:56:28 CEST 2026
Currently, the device object is only manipulated by the dma/idxd bus
callbacks and EAL is not looking too much into this object.
However, in the next refactoring, EAL will expect a clean object, like
when checking that the device has been already probed
(iow dev->driver != NULL).
Request a 0'd object when allocating.
Reported-by: Bruce Richardson <bruce.richardson at intel.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/dma/idxd/idxd_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 291cd6c707..f267c20a59 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -322,7 +322,7 @@ dsa_scan(void)
}
IDXD_PMD_DEBUG("%s(): found %s/%s", __func__, path, wq->d_name);
- dev = malloc(sizeof(*dev));
+ dev = calloc(1, sizeof(*dev));
if (dev == NULL) {
closedir(dev_dir);
return -ENOMEM;
--
2.53.0
More information about the dev
mailing list