device.devargs can be null, don't access device.devargs->args without null check.
Fixes: 3be5d686539c ("net/ixgbe: add support for representor ports") Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com> --- Cc: declan.dohe...@intel.com --- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 15686da10..6088c7e48 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1729,9 +1729,12 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_eth_devargs eth_da; int i, retval; - retval = rte_eth_devargs_parse(pci_dev->device.devargs->args, ð_da); - if (retval) - return retval; + if (pci_dev->device.devargs) { + retval = rte_eth_devargs_parse(pci_dev->device.devargs->args, + ð_da); + if (retval) + return retval; + } /* physical port net_bdf_port */ snprintf(name, sizeof(name), "net_%s_%d", pci_dev->device.name, 0); -- 2.14.3