Subject: [PATCH 5/8][BONDING]: Lost semaphores unlock in one of bonding_store_bonds error paths.

From: Pavel Emelyanov <[email-masked]>
Date: Tue, 29 Apr 2008 19:02:52 +0400

The out: label just makes return. Wipe things up.

Signed-off-by: Pavel Emelyanov <[email-masked]>

---
 drivers/net/bonding/bond_sysfs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 88de27f..752e43b 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -146,12 +146,12 @@ static ssize_t bonding_store_bonds(struct class *cls, const char *buffer, size_t
 						": Unable remove bond %s due to open references.\n",
 						ifname);
 					res = -EPERM;
-					goto out;
+				} else {
+					printk(KERN_INFO DRV_NAME
+						": %s is being deleted...\n",
+						bond->dev->name);
+					bond_destroy(bond);
 				}
-				printk(KERN_INFO DRV_NAME
-					": %s is being deleted...\n",
-					bond->dev->name);
-				bond_destroy(bond);
 				up_write(&bonding_rwsem);
 				rtnl_unlock();
 				goto out;
-- 
1.5.3.4