diff options
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 1c9e09fbdff8..db103e03ba05 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -183,6 +183,11 @@ int bond_create_slave_symlinks(struct net_device *master, | |||
183 | sprintf(linkname, "slave_%s", slave->name); | 183 | sprintf(linkname, "slave_%s", slave->name); |
184 | ret = sysfs_create_link(&(master->dev.kobj), &(slave->dev.kobj), | 184 | ret = sysfs_create_link(&(master->dev.kobj), &(slave->dev.kobj), |
185 | linkname); | 185 | linkname); |
186 | |||
187 | /* free the master link created earlier in case of error */ | ||
188 | if (ret) | ||
189 | sysfs_remove_link(&(slave->dev.kobj), "master"); | ||
190 | |||
186 | return ret; | 191 | return ret; |
187 | 192 | ||
188 | } | 193 | } |