Merge branch 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6-microblaze.git] / net / core / net-sysfs.c
index 6ac29a4..2da59a0 100644 (file)
@@ -77,7 +77,9 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
        if (endp == buf)
                goto err;
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
+
        if (dev_isalive(net)) {
                if ((ret = (*set)(net, new)) == 0)
                        ret = len;
@@ -496,7 +498,7 @@ int netdev_register_kobject(struct net_device *net)
        dev->groups = groups;
 
        BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
-       dev_set_name(dev, net->name);
+       dev_set_name(dev, "%s", net->name);
 
 #ifdef CONFIG_SYSFS
        *groups++ = &netstat_group;