diff options
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 5c31f5cec9f6..9de2c5284e27 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -91,7 +91,8 @@ static ssize_t bonding_show_bonds(struct class *cls, char *buf) | |||
91 | } | 91 | } |
92 | res += sprintf(buf + res, "%s ", bond->dev->name); | 92 | res += sprintf(buf + res, "%s ", bond->dev->name); |
93 | } | 93 | } |
94 | if (res) buf[res-1] = '\n'; /* eat the leftover space */ | 94 | if (res) |
95 | buf[res-1] = '\n'; /* eat the leftover space */ | ||
95 | up_read(&(bonding_rwsem)); | 96 | up_read(&(bonding_rwsem)); |
96 | return res; | 97 | return res; |
97 | } | 98 | } |
@@ -239,7 +240,8 @@ static ssize_t bonding_show_slaves(struct device *d, | |||
239 | res += sprintf(buf + res, "%s ", slave->dev->name); | 240 | res += sprintf(buf + res, "%s ", slave->dev->name); |
240 | } | 241 | } |
241 | read_unlock(&bond->lock); | 242 | read_unlock(&bond->lock); |
242 | if (res) buf[res-1] = '\n'; /* eat the leftover space */ | 243 | if (res) |
244 | buf[res-1] = '\n'; /* eat the leftover space */ | ||
243 | return res; | 245 | return res; |
244 | } | 246 | } |
245 | 247 | ||
@@ -705,7 +707,8 @@ static ssize_t bonding_show_arp_targets(struct device *d, | |||
705 | res += sprintf(buf + res, "%u.%u.%u.%u ", | 707 | res += sprintf(buf + res, "%u.%u.%u.%u ", |
706 | NIPQUAD(bond->params.arp_targets[i])); | 708 | NIPQUAD(bond->params.arp_targets[i])); |
707 | } | 709 | } |
708 | if (res) buf[res-1] = '\n'; /* eat the leftover space */ | 710 | if (res) |
711 | buf[res-1] = '\n'; /* eat the leftover space */ | ||
709 | return res; | 712 | return res; |
710 | } | 713 | } |
711 | 714 | ||