Lines Matching refs:rv
249 int rv = 0; in wdm_int_callback() local
313 rv = usb_submit_urb(desc->response, GFP_ATOMIC); in wdm_int_callback()
314 dev_dbg(&desc->intf->dev, "submit response URB %d\n", rv); in wdm_int_callback()
317 if (rv < 0) { in wdm_int_callback()
319 if (rv == -EPERM) in wdm_int_callback()
321 if (rv == -ENOMEM) { in wdm_int_callback()
323 rv = schedule_work(&desc->rxwork); in wdm_int_callback()
324 if (rv) in wdm_int_callback()
330 rv = usb_submit_urb(urb, GFP_ATOMIC); in wdm_int_callback()
331 if (rv) in wdm_int_callback()
334 __func__, rv); in wdm_int_callback()
379 int rv = -EMSGSIZE, r, we; in wdm_write() local
399 rv = -ERESTARTSYS; in wdm_write()
404 rv = -ENODEV; in wdm_write()
410 rv = usb_translate_errors(r); in wdm_write()
428 rv = r; in wdm_write()
454 rv = usb_submit_urb(desc->command, GFP_KERNEL); in wdm_write()
455 if (rv < 0) { in wdm_write()
459 dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv); in wdm_write()
460 rv = usb_translate_errors(rv); in wdm_write()
477 return rv; in wdm_write()
487 int rv = 0; in service_outstanding_interrupt() local
494 rv = -ENODEV; in service_outstanding_interrupt()
498 rv = -EIO; in service_outstanding_interrupt()
504 rv = usb_submit_urb(desc->response, GFP_KERNEL); in service_outstanding_interrupt()
506 if (rv) { in service_outstanding_interrupt()
509 "usb_submit_urb failed with result %d\n", rv); in service_outstanding_interrupt()
516 return rv; in service_outstanding_interrupt()
522 int rv, cntr; in wdm_read() local
527 rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */ in wdm_read()
528 if (rv < 0) in wdm_read()
536 rv = -ENODEV; in wdm_read()
541 rv = -ENOBUFS; in wdm_read()
547 rv = -EAGAIN; in wdm_read()
550 rv = 0; in wdm_read()
552 rv = wait_event_interruptible(desc->wait, in wdm_read()
558 rv = -ENODEV; in wdm_read()
562 rv = -EIO; in wdm_read()
566 if (rv < 0) { in wdm_read()
567 rv = -ERESTARTSYS; in wdm_read()
574 rv = usb_translate_errors(desc->rerr); in wdm_read()
591 rv = service_outstanding_interrupt(desc); in wdm_read()
593 if (rv < 0) in wdm_read()
603 rv = copy_to_user(buffer, desc->ubuf, cntr); in wdm_read()
604 if (rv > 0) { in wdm_read()
605 rv = -EFAULT; in wdm_read()
621 rv = cntr; in wdm_read()
625 return rv; in wdm_read()
631 long rv; /* Use long here because (int) MAX_SCHEDULE_TIMEOUT < 0. */ in wdm_wait_for_response() local
637 rv = wait_event_interruptible_timeout(desc->wait, in wdm_wait_for_response()
648 if (!rv) in wdm_wait_for_response()
650 if (rv < 0) in wdm_wait_for_response()
654 rv = desc->werr; in wdm_wait_for_response()
658 return usb_translate_errors(rv); in wdm_wait_for_response()
711 int rv = -ENODEV; in wdm_open() local
726 rv = -EBUSY; in wdm_open()
730 rv = usb_autopm_get_interface(desc->intf); in wdm_open()
731 if (rv < 0) { in wdm_open()
732 dev_err(&desc->intf->dev, "Error autopm - %d\n", rv); in wdm_open()
741 rv = usb_submit_urb(desc->validity, GFP_KERNEL); in wdm_open()
742 if (rv < 0) { in wdm_open()
745 "Error submitting int urb - %d\n", rv); in wdm_open()
746 rv = usb_translate_errors(rv); in wdm_open()
749 rv = 0; in wdm_open()
757 return rv; in wdm_open()
794 int rv = 0; in wdm_ioctl() local
799 rv = -EFAULT; in wdm_ioctl()
802 rv = -ENOTTY; in wdm_ioctl()
804 return rv; in wdm_ioctl()
881 int rv; in wdm_wwan_port_tx() local
883 rv = usb_autopm_get_interface(intf); in wdm_wwan_port_tx()
884 if (rv) in wdm_wwan_port_tx()
885 return rv; in wdm_wwan_port_tx()
906 rv = usb_submit_urb(desc->command, GFP_KERNEL); in wdm_wwan_port_tx()
907 if (rv) in wdm_wwan_port_tx()
912 return rv; in wdm_wwan_port_tx()
978 int rv = 0; in wdm_rxwork() local
988 rv = usb_submit_urb(desc->response, GFP_KERNEL); in wdm_rxwork()
989 if (rv < 0 && rv != -EPERM) { in wdm_rxwork()
1020 int rv = -ENOMEM; in wdm_create() local
1040 rv = -EINVAL; in wdm_create()
1112 rv = usb_register_dev(intf, &wdm_class); in wdm_create()
1113 if (rv < 0) in wdm_create()
1121 return rv; in wdm_create()
1127 return rv; in wdm_create()
1133 int rv = usb_autopm_get_interface(intf); in wdm_manage_power() local
1136 if (!rv) in wdm_manage_power()
1143 int rv = -EINVAL; in wdm_probe() local
1164 rv = wdm_create(intf, ep, maxcom, WWAN_PORT_UNKNOWN, &wdm_manage_power); in wdm_probe()
1167 return rv; in wdm_probe()
1196 int rv; in usb_cdc_wdm_register() local
1198 rv = wdm_create(intf, ep, bufsize, type, manage_power); in usb_cdc_wdm_register()
1199 if (rv < 0) in usb_cdc_wdm_register()
1204 return ERR_PTR(rv); in usb_cdc_wdm_register()
1249 int rv = 0; in wdm_suspend() local
1264 rv = -EBUSY; in wdm_suspend()
1280 return rv; in wdm_suspend()
1286 int rv = 0; in recover_from_urb_loss() local
1289 rv = usb_submit_urb(desc->validity, GFP_NOIO); in recover_from_urb_loss()
1290 if (rv < 0) in recover_from_urb_loss()
1292 "Error resume submitting int urb - %d\n", rv); in recover_from_urb_loss()
1294 return rv; in recover_from_urb_loss()
1301 int rv; in wdm_resume() local
1306 rv = recover_from_urb_loss(desc); in wdm_resume()
1308 return rv; in wdm_resume()
1340 int rv; in wdm_post_reset() local
1345 rv = recover_from_urb_loss(desc); in wdm_post_reset()
1348 return rv; in wdm_post_reset()