summaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/files/drivers/net/phy
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-06-13 11:37:32 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-06-13 11:37:32 +0000
commitb4566a37d16109d0c97870cce89d18bc69d9b0fd (patch)
treeefb23256da1225497c5c0335e954c1dd9b542a14 /target/linux/generic-2.6/files/drivers/net/phy
parentf80794beb214669870fcc76c55decf79913f21c0 (diff)
swconfig: release switch in error path of swconfig_get_attr
Signed-off-by: Karl Beldan <karl.beldan@sagemcom.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21779 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/drivers/net/phy')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/swconfig.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
index bda2e2d61..fa916982f 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
@@ -688,7 +688,7 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info)
memset(&val, 0, sizeof(val));
attr = swconfig_lookup_attr(dev, info, &val);
if (!attr || !attr->get)
- goto error_dev;
+ goto error;
if (attr->type == SWITCH_TYPE_PORTS) {
val.value.ports = dev->portbuf;
@@ -737,9 +737,8 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info)
nla_put_failure:
if (msg)
nlmsg_free(msg);
-error_dev:
- swconfig_put_dev(dev);
error:
+ swconfig_put_dev(dev);
if (!err)
err = -ENOMEM;
return err;