diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2020-11-10 13:46:21 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 13:46:21 -0300 |
commit | d96d648dcbbcdf5ecd69193772efe982aafb70d5 (patch) | |
tree | 97eb653b72833e4fd6a21a1d30a0baf165dbd368 /drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | |
parent | ad4c64e47c85a8e6d16ab61aa45d4bd4b645228d (diff) | |
parent | 6b8c5b31298fa141016d304e68fdd912106e4718 (diff) |
Merge pull request #171 from zandrey/5.4-2.1.x-imx
Update 5.4-2.1.x-imx to v5.4.76 from stable
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 5aacc00962df..b8de3784d976 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -125,6 +125,11 @@ static int ionic_get_link_ksettings(struct net_device *netdev, ethtool_link_ksettings_zero_link_mode(ks, supported); + if (!idev->port_info) { + netdev_err(netdev, "port_info not initialized\n"); + return -EOPNOTSUPP; + } + /* The port_info data is found in a DMA space that the NIC keeps * up-to-date, so there's no need to request the data from the * NIC, we already have it in our memory space. |