[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4817379D.8040409@openvz.org>
Date: Tue, 29 Apr 2008 18:58:37 +0400
From: Pavel Emelyanov <xemul@...nvz.org>
To: Jay Vosburgh <fubar@...ibm.com>, David Miller <davem@...emloft.net>
CC: bonding-devel@...ts.sourceforge.net,
Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH 3/8][BONDING]: Merge two calls to dev_alloc_name.
Just reduce the amount of code after the previous patch.
Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists