diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-01-25 06:03:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-25 16:13:16 -0500 |
commit | 672bda337060fa2ff99866a6ebfa3ae036f8b23b (patch) | |
tree | 3dde2d776d9a38494790a9d8c6eeb593676218b7 | |
parent | a512b92b3af4b03fc6834617a042dc85fbd4e34e (diff) |
bonding: fix return value of couple of store functions
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 8fd0174c5380..72bb0f6cc9bf 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d, | |||
1198 | bond->dev->name, new_value); | 1198 | bond->dev->name, new_value); |
1199 | } | 1199 | } |
1200 | out: | 1200 | out: |
1201 | return count; | 1201 | return ret; |
1202 | } | 1202 | } |
1203 | static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, | 1203 | static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, |
1204 | bonding_show_carrier, bonding_store_carrier); | 1204 | bonding_show_carrier, bonding_store_carrier); |
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, | |||
1595 | } | 1595 | } |
1596 | } | 1596 | } |
1597 | out: | 1597 | out: |
1598 | return count; | 1598 | return ret; |
1599 | } | 1599 | } |
1600 | static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, | 1600 | static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, |
1601 | bonding_show_slaves_active, bonding_store_slaves_active); | 1601 | bonding_show_slaves_active, bonding_store_slaves_active); |