Lines Matching refs:retval
44 int retval; member
149 int retval; in uinput_request_send() local
151 retval = mutex_lock_interruptible(&udev->mutex); in uinput_request_send()
152 if (retval) in uinput_request_send()
153 return retval; in uinput_request_send()
156 retval = -ENODEV; in uinput_request_send()
170 return retval; in uinput_request_send()
176 int retval; in uinput_request_submit() local
178 retval = uinput_request_reserve_slot(udev, request); in uinput_request_submit()
179 if (retval) in uinput_request_submit()
180 return retval; in uinput_request_submit()
182 retval = uinput_request_send(udev, request); in uinput_request_submit()
183 if (retval) in uinput_request_submit()
187 retval = -ETIMEDOUT; in uinput_request_submit()
191 retval = request->retval; in uinput_request_submit()
195 return retval; in uinput_request_submit()
212 request->retval = -ENODEV; in uinput_flush_requests()
516 int retval; in uinput_setup_device_legacy() local
537 retval = -EINVAL; in uinput_setup_device_legacy()
545 retval = -ENOMEM; in uinput_setup_device_legacy()
561 retval = uinput_validate_absbits(dev); in uinput_setup_device_legacy()
562 if (retval < 0) in uinput_setup_device_legacy()
566 retval = count; in uinput_setup_device_legacy()
570 return retval; in uinput_setup_device_legacy()
637 int retval; in uinput_write() local
642 retval = mutex_lock_interruptible(&udev->mutex); in uinput_write()
643 if (retval) in uinput_write()
644 return retval; in uinput_write()
646 retval = udev->state == UIST_CREATED ? in uinput_write()
652 return retval; in uinput_write()
695 ssize_t retval; in uinput_read() local
701 retval = mutex_lock_interruptible(&udev->mutex); in uinput_read()
702 if (retval) in uinput_read()
703 return retval; in uinput_read()
706 retval = -ENODEV; in uinput_read()
709 retval = -EAGAIN; in uinput_read()
711 retval = uinput_events_to_user(udev, buffer, count); in uinput_read()
715 if (retval || count == 0) in uinput_read()
719 retval = wait_event_interruptible(udev->waitq, in uinput_read()
722 } while (retval == 0); in uinput_read()
724 return retval; in uinput_read()
753 __s32 retval; member
765 ff_up_compat.retval = ff_up->retval; in uinput_ff_upload_to_user()
800 ff_up->retval = ff_up_compat.retval; in uinput_ff_upload_from_user()
876 int retval; in uinput_ioctl_handler() local
885 retval = mutex_lock_interruptible(&udev->mutex); in uinput_ioctl_handler()
886 if (retval) in uinput_ioctl_handler()
887 return retval; in uinput_ioctl_handler()
892 retval = -ENOMEM; in uinput_ioctl_handler()
900 retval = -EFAULT; in uinput_ioctl_handler()
904 retval = uinput_create_device(udev); in uinput_ioctl_handler()
912 retval = uinput_dev_setup(udev, p); in uinput_ioctl_handler()
918 retval = uinput_set_bit(arg, evbit, EV_MAX); in uinput_ioctl_handler()
922 retval = uinput_set_bit(arg, keybit, KEY_MAX); in uinput_ioctl_handler()
926 retval = uinput_set_bit(arg, relbit, REL_MAX); in uinput_ioctl_handler()
930 retval = uinput_set_bit(arg, absbit, ABS_MAX); in uinput_ioctl_handler()
934 retval = uinput_set_bit(arg, mscbit, MSC_MAX); in uinput_ioctl_handler()
938 retval = uinput_set_bit(arg, ledbit, LED_MAX); in uinput_ioctl_handler()
942 retval = uinput_set_bit(arg, sndbit, SND_MAX); in uinput_ioctl_handler()
946 retval = uinput_set_bit(arg, ffbit, FF_MAX); in uinput_ioctl_handler()
950 retval = uinput_set_bit(arg, swbit, SW_MAX); in uinput_ioctl_handler()
954 retval = uinput_set_bit(arg, propbit, INPUT_PROP_MAX); in uinput_ioctl_handler()
959 retval = -EINVAL; in uinput_ioctl_handler()
965 retval = PTR_ERR(phys); in uinput_ioctl_handler()
974 retval = uinput_ff_upload_from_user(p, &ff_up); in uinput_ioctl_handler()
975 if (retval) in uinput_ioctl_handler()
981 retval = -EINVAL; in uinput_ioctl_handler()
985 ff_up.retval = 0; in uinput_ioctl_handler()
992 retval = uinput_ff_upload_to_user(p, &ff_up); in uinput_ioctl_handler()
997 retval = -EFAULT; in uinput_ioctl_handler()
1003 retval = -EINVAL; in uinput_ioctl_handler()
1007 ff_erase.retval = 0; in uinput_ioctl_handler()
1010 retval = -EFAULT; in uinput_ioctl_handler()
1017 retval = uinput_ff_upload_from_user(p, &ff_up); in uinput_ioctl_handler()
1018 if (retval) in uinput_ioctl_handler()
1024 retval = -EINVAL; in uinput_ioctl_handler()
1028 req->retval = ff_up.retval; in uinput_ioctl_handler()
1034 retval = -EFAULT; in uinput_ioctl_handler()
1040 retval = -EINVAL; in uinput_ioctl_handler()
1044 req->retval = ff_erase.retval; in uinput_ioctl_handler()
1055 retval = -ENOENT; in uinput_ioctl_handler()
1059 retval = uinput_str_to_user(p, name, size); in uinput_ioctl_handler()
1063 retval = uinput_abs_setup(udev, p, size); in uinput_ioctl_handler()
1067 retval = -EINVAL; in uinput_ioctl_handler()
1070 return retval; in uinput_ioctl_handler()