Lines Matching refs:retval
198 int retval;
200 retval = mutex_lock_interruptible(&joydev->mutex);
201 if (retval)
202 return retval;
205 retval = -ENODEV;
207 retval = input_open_device(&joydev->handle);
208 if (retval)
215 return retval;
390 int retval;
404 retval = wait_event_interruptible(joydev->wait,
406 if (retval)
407 return retval;
412 while (retval + sizeof(struct js_event) <= count &&
415 if (copy_to_user(buf + retval, &event, sizeof(struct js_event)))
418 retval += sizeof(struct js_event);
421 while (retval + sizeof(struct js_event) <= count &&
424 if (copy_to_user(buf + retval, &event, sizeof(struct js_event)))
427 retval += sizeof(struct js_event);
430 return retval;
449 int retval = 0;
460 retval = -EINVAL;
472 return retval;
480 int retval = 0;
494 retval = -EINVAL;
506 return retval;
603 int retval;
605 retval = mutex_lock_interruptible(&joydev->mutex);
606 if (retval)
607 return retval;
610 retval = -ENODEV;
617 retval = get_user(tmp32, (s32 __user *) arg);
618 if (retval == 0)
624 retval = put_user(tmp32, (s32 __user *) arg);
628 retval = copy_from_user(&ds32, argp,
630 if (retval == 0) {
648 retval = copy_to_user(argp, &ds32, sizeof(ds32)) ? -EFAULT : 0;
652 retval = joydev_ioctl_common(joydev, cmd, argp);
658 return retval;
668 int retval;
670 retval = mutex_lock_interruptible(&joydev->mutex);
671 if (retval)
672 return retval;
675 retval = -ENODEV;
682 retval = get_user(joydev->glue.JS_TIMELIMIT,
687 retval = put_user(joydev->glue.JS_TIMELIMIT,
692 retval = copy_from_user(&joydev->glue, argp,
697 retval = copy_to_user(argp, &joydev->glue,
702 retval = joydev_ioctl_common(joydev, cmd, argp);
707 return retval;