projects
/
15.05
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca5eb9d
)
kernel: swconfig: add a missing unlock in error path
author
Gabor Juhos
<juhosg@openwrt.org>
Fri, 4 Nov 2011 14:38:31 +0000
(14:38 +0000)
committer
Gabor Juhos
<juhosg@openwrt.org>
Fri, 4 Nov 2011 14:38:31 +0000
(14:38 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28753
3c298f89
-4303-0410-b956-
a3cf2f4a3e73
target/linux/generic/files/drivers/net/phy/swconfig.c
patch
|
blob
|
history
diff --git
a/target/linux/generic/files/drivers/net/phy/swconfig.c
b/target/linux/generic/files/drivers/net/phy/swconfig.c
index
88fa244
..
2038330
100644
(file)
--- a/
target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/
target/linux/generic/files/drivers/net/phy/swconfig.c
@@
-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);