net: devlink: warn on setting type on unregistered port
authorJiri Pirko <jiri@mellanox.com>
Sun, 24 Mar 2019 10:14:36 +0000 (11:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2019 18:55:31 +0000 (14:55 -0400)
commit2b239e7090b89d1e2b73b48300686221ca948637
tree978ff229e987af5ed3615ea6da026ca3e33179a4
parentd0d54e8c359399a8d07656779d5b6ddae68ef3c7
net: devlink: warn on setting type on unregistered port

Port needs to be registered first before the type is set. Warn and
bail-out in case it is not.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c