aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d7695d43158b..2c96b93b12a5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4732,7 +4732,7 @@ static void bond_free_all(void)
4732 */ 4732 */
4733int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl) 4733int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
4734{ 4734{
4735 int mode = -1, i, rv; 4735 int modeint = -1, i, rv;
4736 char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, }; 4736 char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
4737 4737
4738 for (p = (char *)buf; *p; p++) 4738 for (p = (char *)buf; *p; p++)
@@ -4742,13 +4742,13 @@ int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
4742 if (*p) 4742 if (*p)
4743 rv = sscanf(buf, "%20s", modestr); 4743 rv = sscanf(buf, "%20s", modestr);
4744 else 4744 else
4745 rv = sscanf(buf, "%d", &mode); 4745 rv = sscanf(buf, "%d", &modeint);
4746 4746
4747 if (!rv) 4747 if (!rv)
4748 return -1; 4748 return -1;
4749 4749
4750 for (i = 0; tbl[i].modename; i++) { 4750 for (i = 0; tbl[i].modename; i++) {
4751 if (mode == tbl[i].mode) 4751 if (modeint == tbl[i].mode)
4752 return tbl[i].mode; 4752 return tbl[i].mode;
4753 if (strcmp(modestr, tbl[i].modename) == 0) 4753 if (strcmp(modestr, tbl[i].modename) == 0)
4754 return tbl[i].mode; 4754 return tbl[i].mode;