static int sctp_setsockopt_scheduler(struct sock *sk,
				     char __user *optval,
				     unsigned int optlen)
{
	struct sctp_association *asoc;
	struct sctp_assoc_value params;
	int retval = -EINVAL;

	if (optlen < sizeof(params))
		goto out;

	optlen = sizeof(params);
	if (copy_from_user(&params, optval, optlen)) {
		retval = -EFAULT;
		goto out;
	}

	if (params.assoc_value > SCTP_SS_MAX)
		goto out;

	asoc = sctp_id2assoc(sk, params.assoc_id);
	if (!asoc)
		goto out;

	retval = sctp_sched_set_sched(asoc, params.assoc_value);

out:
	return retval;
}
static int sctp_setsockopt_scheduler(struct sock *sk,
				     char __user *optval,
				     unsigned int optlen)
{
	struct sctp_association *asoc;
	struct sctp_assoc_value params;
	int retval = -EINVAL;

	if (optlen < sizeof(params))
		goto out;

	optlen = sizeof(params);
	if (copy_from_user(&params, optval, optlen)) {
		retval = -EFAULT;
		goto out;
	}

	if (params.assoc_value > SCTP_SS_MAX)
		goto out;

	asoc = sctp_id2assoc(sk, params.assoc_id);
	if (!asoc)
		goto out;

	retval = sctp_sched_set_sched(asoc, params.assoc_value);

out:
	return retval;
}