Lines Matching refs:rc
89 int rc; in x25_parse_address_block() local
93 rc = 0; in x25_parse_address_block()
103 rc = -1; in x25_parse_address_block()
113 return rc; in x25_parse_address_block()
428 int rc = -ENOPROTOOPT; in x25_setsockopt() local
433 rc = -EINVAL; in x25_setsockopt()
437 rc = -EFAULT; in x25_setsockopt()
445 rc = 0; in x25_setsockopt()
447 return rc; in x25_setsockopt()
454 int val, len, rc = -ENOPROTOOPT; in x25_getsockopt() local
459 rc = -EFAULT; in x25_getsockopt()
465 rc = -EINVAL; in x25_getsockopt()
469 rc = -EFAULT; in x25_getsockopt()
474 rc = copy_to_user(optval, &val, len) ? -EFAULT : 0; in x25_getsockopt()
476 return rc; in x25_getsockopt()
482 int rc = -EOPNOTSUPP; in x25_listen() local
486 rc = -EINVAL; in x25_listen()
488 return rc; in x25_listen()
495 rc = 0; in x25_listen()
499 return rc; in x25_listen()
532 int rc = -EAFNOSUPPORT; in x25_create() local
537 rc = -ESOCKTNOSUPPORT; in x25_create()
541 rc = -EINVAL; in x25_create()
545 rc = -ENOMEM; in x25_create()
582 rc = 0; in x25_create()
584 return rc; in x25_create()
677 int len, i, rc = 0; in x25_bind() local
682 rc = -EINVAL; in x25_bind()
692 rc = -EINVAL; in x25_bind()
704 rc = -EINVAL; in x25_bind()
709 return rc; in x25_bind()
715 int rc; in x25_wait_for_connection_establishment() local
720 rc = -ERESTARTSYS; in x25_wait_for_connection_establishment()
723 rc = sock_error(sk); in x25_wait_for_connection_establishment()
724 if (rc) { in x25_wait_for_connection_establishment()
728 rc = 0; in x25_wait_for_connection_establishment()
738 return rc; in x25_wait_for_connection_establishment()
748 int rc = 0; in x25_connect() local
756 rc = -ECONNREFUSED; in x25_connect()
762 rc = -EISCONN; /* No reconnect on a seqpacket socket */ in x25_connect()
766 rc = -EALREADY; /* Do nothing if call is already in progress */ in x25_connect()
773 rc = -EINVAL; in x25_connect()
779 rc = -ENETUNREACH; in x25_connect()
794 rc = -EINVAL; in x25_connect()
815 rc = -EINPROGRESS; in x25_connect()
819 rc = x25_wait_for_connection_establishment(sk); in x25_connect()
820 if (rc) in x25_connect()
824 rc = 0; in x25_connect()
826 if (rc && x25->neighbour) { in x25_connect()
837 return rc; in x25_connect()
843 int rc = 0; in x25_wait_for_data() local
850 rc = -ERESTARTSYS; in x25_wait_for_data()
853 rc = -EAGAIN; in x25_wait_for_data()
856 rc = 0; in x25_wait_for_data()
866 return rc; in x25_wait_for_data()
875 int rc = -EINVAL; in x25_accept() local
880 rc = -EOPNOTSUPP; in x25_accept()
885 rc = -EINVAL; in x25_accept()
889 rc = x25_wait_for_data(sk, sk->sk_rcvtimeo); in x25_accept()
890 if (rc) in x25_accept()
893 rc = -EINVAL; in x25_accept()
904 rc = 0; in x25_accept()
908 return rc; in x25_accept()
917 int rc = 0; in x25_getname() local
921 rc = -ENOTCONN; in x25_getname()
929 rc = sizeof(*sx25); in x25_getname()
932 return rc; in x25_getname()
944 int len, addr_len, rc; in x25_rx_call_request() local
1010 rc = 1; in x25_rx_call_request()
1086 rc = 1; in x25_rx_call_request()
1089 return rc; in x25_rx_call_request()
1093 rc = 0; in x25_rx_call_request()
1108 int qbit = 0, rc = -EINVAL; in x25_sendmsg() local
1118 rc = -EADDRNOTAVAIL; in x25_sendmsg()
1122 rc = -EPIPE; in x25_sendmsg()
1128 rc = -ENETUNREACH; in x25_sendmsg()
1133 rc = -EINVAL; in x25_sendmsg()
1137 rc = -EISCONN; in x25_sendmsg()
1140 rc = -EINVAL; in x25_sendmsg()
1149 rc = -ENOTCONN; in x25_sendmsg()
1159 rc = -EMSGSIZE; in x25_sendmsg()
1174 skb = sock_alloc_send_skb(sk, size, noblock, &rc); in x25_sendmsg()
1190 rc = memcpy_from_msg(skb_transport_header(skb), msg, len); in x25_sendmsg()
1191 if (rc) in x25_sendmsg()
1246 rc = -ENOTCONN; in x25_sendmsg()
1253 rc = x25_output(sk, skb); in x25_sendmsg()
1254 len = rc; in x25_sendmsg()
1255 if (rc < 0) in x25_sendmsg()
1262 rc = len; in x25_sendmsg()
1265 return rc; in x25_sendmsg()
1282 int rc = -ENOTCONN; in x25_recvmsg() local
1300 rc = -EINVAL; in x25_recvmsg()
1325 flags & MSG_DONTWAIT, &rc); in x25_recvmsg()
1354 rc = skb_copy_datagram_msg(skb, 0, msg, copied); in x25_recvmsg()
1355 if (rc) in x25_recvmsg()
1365 rc = copied; in x25_recvmsg()
1370 return rc; in x25_recvmsg()
1379 int rc; in x25_ioctl() local
1388 rc = put_user(amount, (unsigned int __user *)argp); in x25_ioctl()
1403 rc = put_user(amount, (unsigned int __user *)argp); in x25_ioctl()
1417 rc = -EINVAL; in x25_ioctl()
1421 rc = -EPERM; in x25_ioctl()
1424 rc = x25_route_ioctl(cmd, argp); in x25_ioctl()
1427 rc = x25_subscr_ioctl(cmd, argp); in x25_ioctl()
1430 rc = -EPERM; in x25_ioctl()
1433 rc = x25_subscr_ioctl(cmd, argp); in x25_ioctl()
1437 rc = copy_to_user(argp, &x25->facilities, in x25_ioctl()
1446 rc = -EFAULT; in x25_ioctl()
1449 rc = -EINVAL; in x25_ioctl()
1481 rc = 0; in x25_ioctl()
1489 rc = copy_to_user(argp, &x25->dte_facilities, in x25_ioctl()
1492 if (rc) in x25_ioctl()
1493 rc = -EFAULT; in x25_ioctl()
1499 rc = -EFAULT; in x25_ioctl()
1502 rc = -EINVAL; in x25_ioctl()
1512 rc = 0; in x25_ioctl()
1520 rc = copy_to_user(argp, &x25->calluserdata, in x25_ioctl()
1530 rc = -EFAULT; in x25_ioctl()
1533 rc = -EINVAL; in x25_ioctl()
1539 rc = 0; in x25_ioctl()
1545 rc = copy_to_user(argp, &x25->causediag, sizeof(x25->causediag)) in x25_ioctl()
1553 rc = -EFAULT; in x25_ioctl()
1559 rc = 0; in x25_ioctl()
1566 rc = -EINVAL; in x25_ioctl()
1570 rc = -EFAULT; in x25_ioctl()
1574 rc = -EINVAL; in x25_ioctl()
1578 rc = 0; in x25_ioctl()
1585 rc = -EINVAL; in x25_ioctl()
1589 rc = 0; in x25_ioctl()
1596 rc = -EINVAL; in x25_ioctl()
1605 rc = 0; in x25_ioctl()
1612 rc = -ENOIOCTLCMD; in x25_ioctl()
1616 return rc; in x25_ioctl()
1632 int rc = -EINVAL; in compat_x25_subscr_ioctl() local
1634 rc = -EFAULT; in compat_x25_subscr_ioctl()
1638 rc = -EINVAL; in compat_x25_subscr_ioctl()
1654 rc = copy_to_user(x25_subscr32, &x25_subscr, in compat_x25_subscr_ioctl()
1657 rc = -EINVAL; in compat_x25_subscr_ioctl()
1659 rc = 0; in compat_x25_subscr_ioctl()
1668 return rc; in compat_x25_subscr_ioctl()
1678 int rc = -ENOIOCTLCMD; in compat_x25_ioctl() local
1683 rc = x25_ioctl(sock, cmd, (unsigned long)argp); in compat_x25_ioctl()
1695 rc = -EINVAL; in compat_x25_ioctl()
1699 rc = -EPERM; in compat_x25_ioctl()
1702 rc = x25_route_ioctl(cmd, argp); in compat_x25_ioctl()
1705 rc = compat_x25_subscr_ioctl(cmd, argp); in compat_x25_ioctl()
1708 rc = -EPERM; in compat_x25_ioctl()
1711 rc = compat_x25_subscr_ioctl(cmd, argp); in compat_x25_ioctl()
1724 rc = x25_ioctl(sock, cmd, (unsigned long)argp); in compat_x25_ioctl()
1727 rc = -ENOIOCTLCMD; in compat_x25_ioctl()
1730 return rc; in compat_x25_ioctl()
1791 int rc; in x25_init() local
1793 rc = proto_register(&x25_proto, 0); in x25_init()
1794 if (rc) in x25_init()
1797 rc = sock_register(&x25_family_ops); in x25_init()
1798 if (rc) in x25_init()
1803 rc = register_netdevice_notifier(&x25_dev_notifier); in x25_init()
1804 if (rc) in x25_init()
1807 rc = x25_register_sysctl(); in x25_init()
1808 if (rc) in x25_init()
1811 rc = x25_proc_init(); in x25_init()
1812 if (rc) in x25_init()
1818 return rc; in x25_init()