mirror of https://github.com/hak5/openwrt-owl.git
parent
d6f02b62d4
commit
297ac9a7f1
|
@ -894,8 +894,10 @@ register_switch(struct switch_dev *dev, struct net_device *netdev)
|
|||
}
|
||||
i = find_first_zero_bit(&in_use, max_switches);
|
||||
|
||||
if (i == max_switches)
|
||||
if (i == max_switches) {
|
||||
swconfig_unlock();
|
||||
return -ENFILE;
|
||||
}
|
||||
|
||||
/* fill device name */
|
||||
snprintf(dev->devname, IFNAMSIZ, SWCONFIG_DEVNAME, i);
|
||||
|
|
Loading…
Reference in New Issue