Lines Matching refs:retval
113 int retval; in kone_check_write() local
123 retval = kone_receive(usb_dev, in kone_check_write()
125 if (retval) in kone_check_write()
126 return retval; in kone_check_write()
163 int retval; in kone_set_settings() local
165 retval = kone_send(usb_dev, kone_command_settings, in kone_set_settings()
167 if (retval) in kone_set_settings()
168 return retval; in kone_set_settings()
235 int retval; in kone_get_weight() local
238 retval = kone_receive(usb_dev, kone_command_weight, &data, 1); in kone_get_weight()
240 if (retval) in kone_get_weight()
241 return retval; in kone_get_weight()
254 int retval; in kone_get_firmware_version() local
257 retval = kone_receive(usb_dev, kone_command_firmware_version, in kone_get_firmware_version()
259 if (retval) in kone_get_firmware_version()
260 return retval; in kone_get_firmware_version()
296 int retval = 0, difference, old_profile; in kone_sysfs_write_settings() local
309 retval = -EINVAL; in kone_sysfs_write_settings()
313 retval = kone_set_settings(usb_dev, settings); in kone_sysfs_write_settings()
314 if (retval) in kone_sysfs_write_settings()
328 if (retval) in kone_sysfs_write_settings()
329 return retval; in kone_sysfs_write_settings()
363 int retval = 0, difference; in kone_sysfs_write_profilex() local
374 retval = kone_set_profile(usb_dev, in kone_sysfs_write_profilex()
377 if (!retval) in kone_sysfs_write_profilex()
382 if (retval) in kone_sysfs_write_profilex()
383 return retval; in kone_sysfs_write_profilex()
426 int retval; in kone_sysfs_show_weight() local
433 retval = kone_get_weight(usb_dev, &weight); in kone_sysfs_show_weight()
436 if (retval) in kone_sysfs_show_weight()
437 return retval; in kone_sysfs_show_weight()
477 int retval; in kone_sysfs_set_tcu() local
484 retval = kstrtoul(buf, 10, &state); in kone_sysfs_set_tcu()
485 if (retval) in kone_sysfs_set_tcu()
486 return retval; in kone_sysfs_set_tcu()
494 retval = kone_tcu_command(usb_dev, 1); in kone_sysfs_set_tcu()
495 if (retval) in kone_sysfs_set_tcu()
497 retval = kone_tcu_command(usb_dev, 2); in kone_sysfs_set_tcu()
498 if (retval) in kone_sysfs_set_tcu()
501 retval = kone_tcu_command(usb_dev, 3); in kone_sysfs_set_tcu()
502 if (retval) in kone_sysfs_set_tcu()
504 retval = kone_tcu_command(usb_dev, 0); in kone_sysfs_set_tcu()
505 if (retval) in kone_sysfs_set_tcu()
507 retval = kone_tcu_command(usb_dev, 4); in kone_sysfs_set_tcu()
508 if (retval) in kone_sysfs_set_tcu()
520 retval = kone_get_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
521 if (retval) in kone_sysfs_set_tcu()
529 retval = kone_set_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
530 if (retval) { in kone_sysfs_set_tcu()
536 retval = kone_get_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
537 if (retval) in kone_sysfs_set_tcu()
545 retval = size; in kone_sysfs_set_tcu()
550 return retval; in kone_sysfs_set_tcu()
567 int retval; in kone_sysfs_set_startup_profile() local
574 retval = kstrtoul(buf, 10, &new_startup_profile); in kone_sysfs_set_startup_profile()
575 if (retval) in kone_sysfs_set_startup_profile()
576 return retval; in kone_sysfs_set_startup_profile()
586 retval = kone_set_settings(usb_dev, &kone->settings); in kone_sysfs_set_startup_profile()
587 if (retval) { in kone_sysfs_set_startup_profile()
589 return retval; in kone_sysfs_set_startup_profile()
664 int retval; in kone_init_kone_device_struct() local
669 retval = kone_get_profile(usb_dev, &kone->profiles[i], i + 1); in kone_init_kone_device_struct()
670 if (retval) in kone_init_kone_device_struct()
671 return retval; in kone_init_kone_device_struct()
674 retval = kone_get_settings(usb_dev, &kone->settings); in kone_init_kone_device_struct()
675 if (retval) in kone_init_kone_device_struct()
676 return retval; in kone_init_kone_device_struct()
678 retval = kone_get_firmware_version(usb_dev, &kone->firmware_version); in kone_init_kone_device_struct()
679 if (retval) in kone_init_kone_device_struct()
680 return retval; in kone_init_kone_device_struct()
699 int retval; in kone_init_specials() local
709 retval = kone_init_kone_device_struct(usb_dev, kone); in kone_init_specials()
710 if (retval) { in kone_init_specials()
715 retval = roccat_connect(kone_class, hdev, in kone_init_specials()
717 if (retval < 0) { in kone_init_specials()
722 kone->chrdev_minor = retval; in kone_init_specials()
731 return retval; in kone_init_specials()
750 int retval; in kone_probe() local
755 retval = hid_parse(hdev); in kone_probe()
756 if (retval) { in kone_probe()
761 retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); in kone_probe()
762 if (retval) { in kone_probe()
767 retval = kone_init_specials(hdev); in kone_probe()
768 if (retval) { in kone_probe()
778 return retval; in kone_probe()
890 int retval; in kone_init() local
898 retval = hid_register_driver(&kone_driver); in kone_init()
899 if (retval) in kone_init()
901 return retval; in kone_init()