Signed-off-by: Karl Beldan <karl.beldan@sagemcom.com>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21781
3c298f89-4303-0410-b956-
a3cf2f4a3e73
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;
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;