net: devlink: add not cleared type warning to port unregister
authorJiri Pirko <jiri@nvidia.com>
Wed, 2 Nov 2022 16:02:08 +0000 (17:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Nov 2022 03:48:35 +0000 (20:48 -0700)
commite705a621c071b43e4ea971abb70d7677dc640c27
treef191fc1f8eb73d831fa643321f9888b548b003e3
parent31265c1e29eb28f17df50d04ee421b5b6369fefd
net: devlink: add not cleared type warning to port unregister

By the time port unregister is called. There should be no type set. Make
sure that the driver cleared it before and warn in case it didn't. This
enforces symmetricity with type set and port register.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c