netifd: fix a typo in vlandev hotplug support
authorFelix Fietkau <nbd@nbd.name>
Mon, 14 Dec 2020 11:59:32 +0000 (12:59 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 14 Dec 2020 12:46:34 +0000 (13:46 +0100)
Need to check the type of the vlan device, not the underlying device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
vlandev.c

index 2f861922d791c9887f0600227f9c91d8e1df75ae..f2440a75220f68d240a6425f99be4638a2b57b4c 100644 (file)
--- a/vlandev.c
+++ b/vlandev.c
@@ -112,7 +112,7 @@ static void vlandev_hotplug_check(struct vlandev_device *mvdev)
        struct device *dev = mvdev->parent.dev;
 
        if (!dev || !dev->hotplug_ops || avl_is_empty(&dev->vlans.avl) ||
-               dev->type != &vlan8021q_device_type) {
+               mvdev->dev.type != &vlan8021q_device_type) {
                mvdev->dev.hotplug_ops = NULL;
                return;
        }