if (!rtnl_trylock())
return restart_syscall();
- if (netif_running(netdev) && netdev->ethtool_ops->get_settings) {
+ if (netif_running(netdev) &&
+ netdev->ethtool_ops &&
+ netdev->ethtool_ops->get_settings) {
struct ethtool_cmd cmd = { ETHTOOL_GSET };
if (!netdev->ethtool_ops->get_settings(netdev, &cmd))
if (!rtnl_trylock())
return restart_syscall();
- if (netif_running(netdev) && netdev->ethtool_ops->get_settings) {
+ if (netif_running(netdev) &&
+ netdev->ethtool_ops &&
+ netdev->ethtool_ops->get_settings) {
struct ethtool_cmd cmd = { ETHTOOL_GSET };
if (!netdev->ethtool_ops->get_settings(netdev, &cmd))