diff options
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 979c2d05ff9c..68c41a00d93d 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -146,29 +146,29 @@ static ssize_t bonding_store_bonds(struct class *cls, const char *buffer, size_t | |||
146 | ": Unable remove bond %s due to open references.\n", | 146 | ": Unable remove bond %s due to open references.\n", |
147 | ifname); | 147 | ifname); |
148 | res = -EPERM; | 148 | res = -EPERM; |
149 | goto out; | 149 | goto out_unlock; |
150 | } | 150 | } |
151 | printk(KERN_INFO DRV_NAME | 151 | printk(KERN_INFO DRV_NAME |
152 | ": %s is being deleted...\n", | 152 | ": %s is being deleted...\n", |
153 | bond->dev->name); | 153 | bond->dev->name); |
154 | bond_destroy(bond); | 154 | bond_destroy(bond); |
155 | up_write(&bonding_rwsem); | 155 | goto out_unlock; |
156 | rtnl_unlock(); | ||
157 | goto out; | ||
158 | } | 156 | } |
159 | 157 | ||
160 | printk(KERN_ERR DRV_NAME | 158 | printk(KERN_ERR DRV_NAME |
161 | ": unable to delete non-existent bond %s\n", ifname); | 159 | ": unable to delete non-existent bond %s\n", ifname); |
162 | res = -ENODEV; | 160 | res = -ENODEV; |
163 | up_write(&bonding_rwsem); | 161 | goto out_unlock; |
164 | rtnl_unlock(); | ||
165 | goto out; | ||
166 | } | 162 | } |
167 | 163 | ||
168 | err_no_cmd: | 164 | err_no_cmd: |
169 | printk(KERN_ERR DRV_NAME | 165 | printk(KERN_ERR DRV_NAME |
170 | ": no command found in bonding_masters. Use +ifname or -ifname.\n"); | 166 | ": no command found in bonding_masters. Use +ifname or -ifname.\n"); |
171 | res = -EPERM; | 167 | return -EPERM; |
168 | |||
169 | out_unlock: | ||
170 | up_write(&bonding_rwsem); | ||
171 | rtnl_unlock(); | ||
172 | 172 | ||
173 | /* Always return either count or an error. If you return 0, you'll | 173 | /* Always return either count or an error. If you return 0, you'll |
174 | * get called forever, which is bad. | 174 | * get called forever, which is bad. |