From: Jiri Pirko Date: Tue, 25 Jan 2011 11:03:25 +0000 (+0000) Subject: bonding: fix return value of couple of store functions X-Git-Tag: accepted/tizen/common/20141203.182822~8362^2~472 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=672bda337060fa2ff99866a6ebfa3ae036f8b23b;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 8fd0174..72bb0f6 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, 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);