diff options
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r-- | 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 bb1319f9f173..88fcb25e554a 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1533,8 +1533,8 @@ static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, | |||
1533 | * Show and set the number of IGMP membership reports to send on link failure | 1533 | * Show and set the number of IGMP membership reports to send on link failure |
1534 | */ | 1534 | */ |
1535 | static ssize_t bonding_show_resend_igmp(struct device *d, | 1535 | static ssize_t bonding_show_resend_igmp(struct device *d, |
1536 | struct device_attribute *attr, | 1536 | struct device_attribute *attr, |
1537 | char *buf) | 1537 | char *buf) |
1538 | { | 1538 | { |
1539 | struct bonding *bond = to_bond(d); | 1539 | struct bonding *bond = to_bond(d); |
1540 | 1540 | ||
@@ -1542,8 +1542,8 @@ static ssize_t bonding_show_resend_igmp(struct device *d, | |||
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | static ssize_t bonding_store_resend_igmp(struct device *d, | 1544 | static ssize_t bonding_store_resend_igmp(struct device *d, |
1545 | struct device_attribute *attr, | 1545 | struct device_attribute *attr, |
1546 | const char *buf, size_t count) | 1546 | const char *buf, size_t count) |
1547 | { | 1547 | { |
1548 | int new_value, ret = count; | 1548 | int new_value, ret = count; |
1549 | struct bonding *bond = to_bond(d); | 1549 | struct bonding *bond = to_bond(d); |
@@ -1555,7 +1555,7 @@ static ssize_t bonding_store_resend_igmp(struct device *d, | |||
1555 | goto out; | 1555 | goto out; |
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | if (new_value < 0) { | 1558 | if (new_value < 0 || new_value > 255) { |
1559 | pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n", | 1559 | pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n", |
1560 | bond->dev->name, new_value); | 1560 | bond->dev->name, new_value); |
1561 | ret = -EINVAL; | 1561 | ret = -EINVAL; |