summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/main.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-09-09 01:21:13 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-10 22:49:00 +0300
commit3ea87ca772a95ca645d2f4b3e71c2747ceb251e0 (patch)
treef4ae37ad5aed3937d4ca702cb58d8f452f7cb1d6 /drivers/net/ethernet/mellanox/mlx4/main.c
parent6eb8b7fbe3915921738b2cac211ff65b75750a04 (diff)
downloadlinux-3ea87ca772a95ca645d2f4b3e71c2747ceb251e0.tar.xz
devlink: don't crash if netdev is NULL
Following change will add support for a corner case where we may not have a netdev to pass to devlink_port_type_eth_set() but we still want to set port type. This is definitely a corner case, and drivers should not normally pass NULL netdev - print a warning message when this happens. Sadly for other port types (ib) switches don't have a device reference, the way we always do for Ethernet, so we can't put the warning in __devlink_port_type_set(). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
0 files changed, 0 insertions, 0 deletions