raw/dpaa2_cmdif: fix warnings with GCC 9

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: 3298fa4853 ("raw/dpaa2_cmdif: introduce DPAA2 command interface driver")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Bruce Richardson 2019-05-01 20:50:14 +01:00 committed by Thomas Monjalon
parent 3a66890a8a
commit a53f14f961

View File

@ -270,6 +270,8 @@ dpaa2_cmdif_remove(struct rte_vdev_device *vdev)
int ret;
name = rte_vdev_device_name(vdev);
if (name == NULL)
return -1;
DPAA2_CMDIF_INFO("Closing %s on NUMA node %d", name, rte_socket_id());