Initialize the "dev" pointer in the eventdev structure so it can be
returned in calls to "rte_event_dev_info_get()" and avoid potential
crashes due to a NULL value being passed to "rte_dev_name()"
Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
---
drivers/event/dsw/dsw_evdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 785c12f61f..44da3c60d1 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -440,6 +440,7 @@ dsw_probe(struct rte_vdev_device *vdev)
return -EFAULT;
dev->dev_ops = &dsw_evdev_ops;
+ dev->dev = &vdev->device;
dev->enqueue = dsw_event_enqueue;
dev->enqueue_burst = dsw_event_enqueue_burst;
dev->enqueue_new_burst = dsw_event_enqueue_new_burst;
--
2.39.2