Message ID | 20221117153744.688595-3-simon.horman@corigine.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 0873016d46f6dfafd1bdf4d9b935b3331b226f7c |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | nfp: fixes for v6.1 | expand |
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c index 1775997f9c69..991059d6cb32 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c @@ -1432,6 +1432,9 @@ nfp_port_get_module_info(struct net_device *netdev, u8 data; port = nfp_port_from_netdev(netdev); + if (!port) + return -EOPNOTSUPP; + /* update port state to get latest interface */ set_bit(NFP_PORT_CHANGED, &port->flags); eth_port = nfp_port_get_eth_port(port);