net/cxgbe: avoid polling link status before device start
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 27 Sep 2019 20:30:06 +0000 (02:00 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:57 +0000 (15:00 +0200)
commit10fb9e47f6ec0093397b62f2c74f221719f967f4
treeb3ef480b515862b60860004328335268ea0f61af
parentb1df19e43e1d1415ab7fae119e672a2f3b8f39f0
net/cxgbe: avoid polling link status before device start

Link updates come in firmware event queue, which is only created
when device starts. So, don't poll for link status if firmware
event queue is not yet created.

This fixes NULL dereference when accessing non existent firmware
event queue.

Fixes: 265af08e75ba ("net/cxgbe: add link up and down ops")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/cxgbe_ethdev.c