summaryrefslogtreecommitdiff
path: root/net/mctp/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mctp/device.c')
-rw-r--r--net/mctp/device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mctp/device.c b/net/mctp/device.c
index b9f38e765f61..c34963974cc1 100644
--- a/net/mctp/device.c
+++ b/net/mctp/device.c
@@ -356,9 +356,12 @@ static int mctp_register(struct net_device *dev)
if (rtnl_dereference(dev->mctp_ptr))
return 0;
- /* only register specific types; MCTP-specific and loopback for now */
- if (dev->type != ARPHRD_MCTP && dev->type != ARPHRD_LOOPBACK)
+ /* only register specific types (inc. NONE for TUN devices) */
+ if (!(dev->type == ARPHRD_MCTP ||
+ dev->type == ARPHRD_LOOPBACK ||
+ dev->type == ARPHRD_NONE)) {
return 0;
+ }
mdev = mctp_add_dev(dev);
if (IS_ERR(mdev))