Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 672bda33 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

bonding: fix return value of couple of store functions



count is incorrectly returned even in case of fail. Return ret instead.

Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a512b92b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d,
			bond->dev->name, new_value);
			bond->dev->name, new_value);
	}
	}
out:
out:
	return count;
	return ret;
}
}
static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
		   bonding_show_carrier, bonding_store_carrier);
		   bonding_show_carrier, bonding_store_carrier);
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
		}
		}
	}
	}
out:
out:
	return count;
	return ret;
}
}
static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
		   bonding_show_slaves_active, bonding_store_slaves_active);
		   bonding_show_slaves_active, bonding_store_slaves_active);