X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Focteontx2%2Fotx2_link.c;h=725b793d4dcbc5dcc2ed9752120a9da404baf166;hb=14d7ea259aebaacfa9326e54e881ab0e550f6a6e;hp=8fcbdc9b7c0a1c957c4a886bff9e09c83e42dd91;hpb=2e0b193da80134663ab405b0888cec6b90c83e0f;p=dpdk.git diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c index 8fcbdc9b7c..725b793d4d 100644 --- a/drivers/net/octeontx2/otx2_link.c +++ b/drivers/net/octeontx2/otx2_link.c @@ -52,10 +52,14 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev, struct cgx_link_user_info *link) { struct otx2_eth_dev *otx2_dev = (struct otx2_eth_dev *)dev; - struct rte_eth_dev *eth_dev = otx2_dev->eth_dev; struct rte_eth_link eth_link; + struct rte_eth_dev *eth_dev; - if (!link || !dev || !eth_dev->data->dev_conf.intr_conf.lsc) + if (!link || !dev) + return; + + eth_dev = otx2_dev->eth_dev; + if (!eth_dev || !eth_dev->data->dev_conf.intr_conf.lsc) return; if (nix_wait_for_link_cfg(otx2_dev)) {