Lines Matching refs:retval

193 	int retval;  in joydev_open_device()  local
195 retval = mutex_lock_interruptible(&joydev->mutex); in joydev_open_device()
196 if (retval) in joydev_open_device()
197 return retval; in joydev_open_device()
200 retval = -ENODEV; in joydev_open_device()
202 retval = input_open_device(&joydev->handle); in joydev_open_device()
203 if (retval) in joydev_open_device()
208 return retval; in joydev_open_device()
383 int retval; in joydev_read() local
397 retval = wait_event_interruptible(joydev->wait, in joydev_read()
399 if (retval) in joydev_read()
400 return retval; in joydev_read()
405 while (retval + sizeof(struct js_event) <= count && in joydev_read()
408 if (copy_to_user(buf + retval, &event, sizeof(struct js_event))) in joydev_read()
411 retval += sizeof(struct js_event); in joydev_read()
414 while (retval + sizeof(struct js_event) <= count && in joydev_read()
417 if (copy_to_user(buf + retval, &event, sizeof(struct js_event))) in joydev_read()
420 retval += sizeof(struct js_event); in joydev_read()
423 return retval; in joydev_read()
442 int retval = 0; in joydev_handle_JSIOCSAXMAP() local
452 retval = -EFAULT; in joydev_handle_JSIOCSAXMAP()
458 retval = -EINVAL; in joydev_handle_JSIOCSAXMAP()
470 return retval; in joydev_handle_JSIOCSAXMAP()
478 int retval = 0; in joydev_handle_JSIOCSBTNMAP() local
488 retval = -EFAULT; in joydev_handle_JSIOCSBTNMAP()
494 retval = -EINVAL; in joydev_handle_JSIOCSBTNMAP()
506 return retval; in joydev_handle_JSIOCSBTNMAP()
603 int retval; in joydev_compat_ioctl() local
605 retval = mutex_lock_interruptible(&joydev->mutex); in joydev_compat_ioctl()
606 if (retval) in joydev_compat_ioctl()
607 return retval; in joydev_compat_ioctl()
610 retval = -ENODEV; in joydev_compat_ioctl()
617 retval = get_user(tmp32, (s32 __user *) arg); in joydev_compat_ioctl()
618 if (retval == 0) in joydev_compat_ioctl()
624 retval = put_user(tmp32, (s32 __user *) arg); in joydev_compat_ioctl()
628 retval = copy_from_user(&ds32, argp, in joydev_compat_ioctl()
630 if (retval == 0) { in joydev_compat_ioctl()
648 retval = copy_to_user(argp, &ds32, sizeof(ds32)) ? -EFAULT : 0; in joydev_compat_ioctl()
652 retval = joydev_ioctl_common(joydev, cmd, argp); in joydev_compat_ioctl()
658 return retval; in joydev_compat_ioctl()
668 int retval; in joydev_ioctl() local
670 retval = mutex_lock_interruptible(&joydev->mutex); in joydev_ioctl()
671 if (retval) in joydev_ioctl()
672 return retval; in joydev_ioctl()
675 retval = -ENODEV; in joydev_ioctl()
682 retval = get_user(joydev->glue.JS_TIMELIMIT, in joydev_ioctl()
687 retval = put_user(joydev->glue.JS_TIMELIMIT, in joydev_ioctl()
692 retval = copy_from_user(&joydev->glue, argp, in joydev_ioctl()
697 retval = copy_to_user(argp, &joydev->glue, in joydev_ioctl()
702 retval = joydev_ioctl_common(joydev, cmd, argp); in joydev_ioctl()
707 return retval; in joydev_ioctl()