Lines Matching refs:rv

311 	int rv = 0;  in vcc_ldc_read()  local
315 rv = ldc_rx_reset(vio->lp); in vcc_ldc_read()
316 vccdbg("VCC: reset rx q: rv=%d\n", rv); in vcc_ldc_read()
329 rv = ldc_read(vio->lp, &pkt, sizeof(pkt)); in vcc_ldc_read()
330 if (rv <= 0) in vcc_ldc_read()
333 vccdbg("VCC: ldc_read()=%d\n", rv); in vcc_ldc_read()
346 rv = -ECONNRESET; in vcc_ldc_read()
350 WARN_ON(rv != LDC_PACKET_SIZE); in vcc_ldc_read()
354 return rv; in vcc_ldc_read()
362 int rv; in vcc_rx_timer() local
374 rv = vcc_ldc_read(port); in vcc_rx_timer()
375 if (rv == -ECONNRESET) in vcc_rx_timer()
389 int rv; in vcc_tx_timer() local
406 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_tx_timer()
407 WARN_ON(!rv); in vcc_tx_timer()
409 if (rv < 0) { in vcc_tx_timer()
410 vccdbg("VCC: ldc_write()=%d\n", rv); in vcc_tx_timer()
437 int rv; in vcc_event() local
451 rv = vcc_ldc_read(port); in vcc_event()
452 if (rv == -ECONNRESET) in vcc_event()
482 int rv; in domain_show() local
488 rv = scnprintf(buf, PAGE_SIZE, "%s\n", port->domain); in domain_show()
490 return rv; in domain_show()
496 int rv; in vcc_send_ctl() local
502 rv = ldc_write(port->vio.lp, &pkt, sizeof(pkt.tag)); in vcc_send_ctl()
503 WARN_ON(!rv); in vcc_send_ctl()
504 vccdbg("VCC: ldc_write(%ld)=%d\n", sizeof(pkt.tag), rv); in vcc_send_ctl()
506 return rv; in vcc_send_ctl()
515 int rv = count; in break_store() local
525 rv = -EINVAL; in break_store()
531 return rv; in break_store()
568 int rv; in vcc_probe() local
583 rv = -ENOMEM; in vcc_probe()
587 rv = vio_driver_init(&port->vio, vdev, VDEV_CONSOLE_CON, vcc_versions, in vcc_probe()
589 if (rv) in vcc_probe()
595 rv = vio_ldc_alloc(&port->vio, &vcc_ldc_cfg, port); in vcc_probe()
596 if (rv) in vcc_probe()
604 rv = -ENOMEM; in vcc_probe()
611 rv = PTR_ERR(dev); in vcc_probe()
619 rv = -ENXIO; in vcc_probe()
626 rv = -ENXIO; in vcc_probe()
632 rv = -ENOMEM; in vcc_probe()
639 rv = sysfs_create_group(&vdev->dev.kobj, &vcc_attribute_group); in vcc_probe()
640 if (rv) in vcc_probe()
670 return rv; in vcc_probe()
824 int rv = -EINVAL; in vcc_write() local
859 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_write()
861 (VIO_TAG_SIZE + tosend), rv); in vcc_write()
865 if (rv < 0) { in vcc_write()
877 vccdbg("VCC: write: total=%zu rv=%d", total_sent, rv); in vcc_write()
879 return total_sent ? total_sent : rv; in vcc_write()
1022 int rv; in vcc_tty_init() local
1039 rv = tty_register_driver(vcc_tty_driver); in vcc_tty_init()
1040 if (rv) { in vcc_tty_init()
1044 return rv; in vcc_tty_init()
1063 int rv; in vcc_init() local
1065 rv = vcc_tty_init(); in vcc_init()
1066 if (rv) { in vcc_init()
1068 return rv; in vcc_init()
1071 rv = vio_register_driver(&vcc_driver); in vcc_init()
1072 if (rv) { in vcc_init()
1079 return rv; in vcc_init()