OSDN Git Service

nfp: return -EOPNOTSUPP from .ndo_get_phys_port_name for VFs
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 26 May 2018 04:53:25 +0000 (21:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 May 2018 13:49:15 +0000 (09:49 -0400)
commit6fd1cfc0f0a5fec92cce8a5c3fbfd7fd82b82160
tree7fef6471f5fd2e4941ad52873a62ad84b3eccee2
parent874fcf1de613ad7b3cecf8a9cfe806fe7c2e3c68
nfp: return -EOPNOTSUPP from .ndo_get_phys_port_name for VFs

After recent change we started returning 0 from
ndo_get_phys_port_name for VFs.  The name parameter for
ndo_get_phys_port_name is not initialized by the stack so
this can lead to a crash.  We should have kept returning
-EOPNOTSUPP in the first place.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c