Subject: [PATCH 3/8][BONDING]: Merge two calls to dev_alloc_name.

From: Pavel Emelyanov <[email-masked]>
Date: Tue, 29 Apr 2008 18:58:37 +0400

Just reduce the amount of code after the previous patch.

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

---
 drivers/net/bonding/bond_main.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2072910..0907f43 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4905,11 +4905,10 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
 		goto out_rtnl;
 	}
 
-	if (!name) {
-		res = dev_alloc_name(bond_dev, "bond%d");
-		if (res < 0)
-			goto out_netdev;
-	} else if (strchr(name, '%')) {
+	if (!name)
+		name = "bond%d";
+
+	if (strchr(name, '%')) {
 		res = dev_alloc_name(bond_dev, name);
 		if (res < 0)
 			goto out_netdev;
-- 
1.5.3.4