net/sfc/base: prevent access to the NIC config before probe

NIC config is initialized during NIC probe.

Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Cc: stable@dpdk.org

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Mark Spender 2018-09-10 10:33:26 +01:00 committed by Ferruh Yigit
parent 416aa7f1c9
commit f78fb0a8e1

View File

@ -595,6 +595,7 @@ efx_nic_cfg_get(
__in efx_nic_t *enp)
{
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
return (&(enp->en_nic_cfg));
}