GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.
Fixes:
61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
name = rte_vdev_device_name(vdev);
+ if (name == NULL)
+ return -EINVAL;
+
/* More than one instance is not supported */
if (skeldev_init_once) {
SKELETON_PMD_ERR("Multiple instance not supported for %s",
int ret;
name = rte_vdev_device_name(vdev);
+ if (name == NULL)
+ return -1;
SKELETON_PMD_INFO("Closing %s on NUMA node %d", name, rte_socket_id());