bonding: fix return value of bonding_store_slaves_active()
Subsystems (3)
PATCH 1/1 bonding: fix return value of bonding_store_slaves_active()
count is incorrectly returned even in case of fail. Return ret instead.
drivers/net/bonding/bond_sysfs.c +1 -1
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, } } out: -return count; +return ret; } static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, bonding_show_slaves_active, bonding_store_slaves_active);
Quoted 3 lines · Jiri Pirko
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by Jiri Pirko <[email protected]>
It looks like bonding_store_carrier has the same problem, could
you fix it up too and resubmit?
-J
Quoted 13 lines
drivers/net/bonding/bond_sysfs.c +0
-0@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, } }out:
drivers/net/bonding/bond_sysfs.c +1
-1-return count; +return ret;}
static DEVICE_ATTR(all_slaves_active,S_IRUGO|S_IWUSR,bonding_show_slaves_active, bonding_store_slaves_active);
Quoted 8 lines · Tue, Jan 25, 2011 at 08:22:50PM CET, [email protected] wrote:
Quoted 3 lines · Jiri Pirko
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by Jiri Pirko <[email protected]>It looks like
bonding_store_carrierhas the same problem, could
you fix it up too and resubmit?
you are right, I missed that. Will resend.
Thanks.
Jirka
Quoted 18 lines
-JQuoted 13 lines
drivers/net/bonding/bond_sysfs.c +0
-0@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, } }out:
drivers/net/bonding/bond_sysfs.c +1
-1-return count; +return ret;}
static DEVICE_ATTR(all_slaves_active,S_IRUGO|S_IWUSR,bonding_show_slaves_active, bonding_store_slaves_active);
PATCH 1/1 bonding: fix return value of couple of store functions
In reply to Jay Vosburghcount is incorrectly returned even in case of fail. Return ret instead.
drivers/net/bonding/bond_sysfs.c +2 -2
@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d, bond->dev->name, new_value); } out: -return count; +return ret; } static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, bonding_show_carrier, bonding_store_carrier);
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, } } out: -return count; +return ret; } static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, bonding_show_slaves_active, bonding_store_slaves_active);
Re: [PATCH net-next-2.6] bonding: fix return value of couple of store functions
Quoted 3 lines · Jiri Pirko
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by Jiri Pirko <[email protected]>
Quoted 22 lines
drivers/net/bonding/bond_sysfs.c +0
-0@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d, bond->dev->name, new_value); }out:
drivers/net/bonding/bond_sysfs.c +1
-1-return count; +return ret;}
static DEVICE_ATTR(use_carrier,S_IRUGO|S_IWUSR,bonding_show_carrier, bonding_store_carrier);drivers/net/bonding/bond_sysfs.c +0
-0@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, } }out:
drivers/net/bonding/bond_sysfs.c +1
-1-return count; +return ret;}
static DEVICE_ATTR(all_slaves_active,S_IRUGO|S_IWUSR,bonding_show_slaves_active, bonding_store_slaves_active);
Re: [PATCH net-next-2.6] bonding: fix return value of couple of store functions
From: Jay Vosburgh <[email protected]>
Date: Tue, 25 Jan 2011 13:07:06 -0800
Quoted 7 lines
Quoted 3 lines · Jiri Pirko
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by Jiri Pirko <[email protected]>Signed-off-by Jay Vosburgh <[email protected]>
Applied, thanks guys.