Lines Matching refs:rv
233 int rv = 0; in wdm_int_callback() local
297 rv = usb_submit_urb(desc->response, GFP_ATOMIC); in wdm_int_callback()
298 dev_dbg(&desc->intf->dev, "submit response URB %d\n", rv); in wdm_int_callback()
301 if (rv < 0) { in wdm_int_callback()
303 if (rv == -EPERM) in wdm_int_callback()
305 if (rv == -ENOMEM) { in wdm_int_callback()
307 rv = schedule_work(&desc->rxwork); in wdm_int_callback()
308 if (rv) in wdm_int_callback()
314 rv = usb_submit_urb(urb, GFP_ATOMIC); in wdm_int_callback()
315 if (rv) in wdm_int_callback()
318 __func__, rv); in wdm_int_callback()
352 int rv = -EMSGSIZE, r, we; in wdm_write() local
368 rv = -ENOMEM; in wdm_write()
374 rv = -EFAULT; in wdm_write()
380 rv = -ERESTARTSYS; in wdm_write()
385 rv = -ENODEV; in wdm_write()
391 rv = usb_translate_errors(r); in wdm_write()
406 rv = r; in wdm_write()
432 rv = usb_submit_urb(desc->command, GFP_KERNEL); in wdm_write()
433 if (rv < 0) { in wdm_write()
436 dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv); in wdm_write()
437 rv = usb_translate_errors(rv); in wdm_write()
447 return rv < 0 ? rv : count; in wdm_write()
455 return rv; in wdm_write()
465 int rv = 0; in service_outstanding_interrupt() local
473 rv = usb_submit_urb(desc->response, GFP_KERNEL); in service_outstanding_interrupt()
475 if (rv) { in service_outstanding_interrupt()
477 "usb_submit_urb failed with result %d\n", rv); in service_outstanding_interrupt()
484 return rv; in service_outstanding_interrupt()
490 int rv, cntr; in wdm_read() local
495 rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */ in wdm_read()
496 if (rv < 0) in wdm_read()
504 rv = -ENODEV; in wdm_read()
509 rv = -ENOBUFS; in wdm_read()
515 rv = cntr ? cntr : -EAGAIN; in wdm_read()
518 rv = 0; in wdm_read()
520 rv = wait_event_interruptible(desc->wait, in wdm_read()
526 rv = -ENODEV; in wdm_read()
530 rv = -EIO; in wdm_read()
534 if (rv < 0) { in wdm_read()
535 rv = -ERESTARTSYS; in wdm_read()
542 rv = usb_translate_errors(desc->rerr); in wdm_read()
559 rv = service_outstanding_interrupt(desc); in wdm_read()
561 if (rv < 0) in wdm_read()
571 rv = copy_to_user(buffer, desc->ubuf, cntr); in wdm_read()
572 if (rv > 0) { in wdm_read()
573 rv = -EFAULT; in wdm_read()
589 rv = cntr; in wdm_read()
593 return rv; in wdm_read()
639 int rv = -ENODEV; in wdm_open() local
653 rv = usb_autopm_get_interface(desc->intf); in wdm_open()
654 if (rv < 0) { in wdm_open()
655 dev_err(&desc->intf->dev, "Error autopm - %d\n", rv); in wdm_open()
664 rv = usb_submit_urb(desc->validity, GFP_KERNEL); in wdm_open()
665 if (rv < 0) { in wdm_open()
668 "Error submitting int urb - %d\n", rv); in wdm_open()
669 rv = usb_translate_errors(rv); in wdm_open()
672 rv = 0; in wdm_open()
680 return rv; in wdm_open()
715 int rv = 0; in wdm_ioctl() local
720 rv = -EFAULT; in wdm_ioctl()
723 rv = -ENOTTY; in wdm_ioctl()
725 return rv; in wdm_ioctl()
752 int rv = 0; in wdm_rxwork() local
762 rv = usb_submit_urb(desc->response, GFP_KERNEL); in wdm_rxwork()
763 if (rv < 0 && rv != -EPERM) { in wdm_rxwork()
778 int rv = -ENOMEM; in wdm_create() local
795 rv = -EINVAL; in wdm_create()
867 rv = usb_register_dev(intf, &wdm_class); in wdm_create()
868 if (rv < 0) in wdm_create()
873 return rv; in wdm_create()
879 return rv; in wdm_create()
885 int rv = usb_autopm_get_interface(intf); in wdm_manage_power() local
888 if (!rv) in wdm_manage_power()
895 int rv = -EINVAL; in wdm_probe() local
916 rv = wdm_create(intf, ep, maxcom, &wdm_manage_power); in wdm_probe()
919 return rv; in wdm_probe()
946 int rv = -EINVAL; in usb_cdc_wdm_register() local
948 rv = wdm_create(intf, ep, bufsize, manage_power); in usb_cdc_wdm_register()
949 if (rv < 0) in usb_cdc_wdm_register()
954 return ERR_PTR(rv); in usb_cdc_wdm_register()
998 int rv = 0; in wdm_suspend() local
1013 rv = -EBUSY; in wdm_suspend()
1027 return rv; in wdm_suspend()
1033 int rv = 0; in recover_from_urb_loss() local
1036 rv = usb_submit_urb(desc->validity, GFP_NOIO); in recover_from_urb_loss()
1037 if (rv < 0) in recover_from_urb_loss()
1039 "Error resume submitting int urb - %d\n", rv); in recover_from_urb_loss()
1041 return rv; in recover_from_urb_loss()
1048 int rv; in wdm_resume() local
1053 rv = recover_from_urb_loss(desc); in wdm_resume()
1055 return rv; in wdm_resume()
1086 int rv; in wdm_post_reset() local
1090 rv = recover_from_urb_loss(desc); in wdm_post_reset()