devlink: Add WARN_ON to catch errors of not cleaning devlink objects
authorParav Pandit <parav@mellanox.com>
Fri, 8 Feb 2019 21:15:00 +0000 (15:15 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Feb 2019 21:21:25 +0000 (13:21 -0800)
commitb904aada8033749558e3aaeb574a2200bf0458f0
tree5bae307e117c65fe6fbb5a5b34c1afca1ee92181
parentcbd72b485214f085a022b56a3051524577d891fe
devlink: Add WARN_ON to catch errors of not cleaning devlink objects

Add WARN_ON to make sure that all sub objects of a devlink device are
cleanedup before freeing the devlink device.
This helps to catch any driver bugs.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c