Lines Matching refs:rc

35 	int rc = 0;  in nfc_fw_download()  local
42 rc = -ENODEV; in nfc_fw_download()
47 rc = -EBUSY; in nfc_fw_download()
52 rc = -EOPNOTSUPP; in nfc_fw_download()
57 rc = dev->ops->fw_download(dev, firmware_name); in nfc_fw_download()
58 if (rc) in nfc_fw_download()
63 return rc; in nfc_fw_download()
91 int rc = 0; in nfc_dev_up() local
98 rc = -ENODEV; in nfc_dev_up()
103 rc = -ERFKILL; in nfc_dev_up()
108 rc = -EBUSY; in nfc_dev_up()
113 rc = -EALREADY; in nfc_dev_up()
118 rc = dev->ops->dev_up(dev); in nfc_dev_up()
120 if (!rc) in nfc_dev_up()
129 return rc; in nfc_dev_up()
139 int rc = 0; in nfc_dev_down() local
146 rc = -ENODEV; in nfc_dev_down()
151 rc = -EALREADY; in nfc_dev_down()
156 rc = -EBUSY; in nfc_dev_down()
167 return rc; in nfc_dev_down()
200 int rc; in nfc_start_poll() local
211 rc = -ENODEV; in nfc_start_poll()
216 rc = -ENODEV; in nfc_start_poll()
221 rc = -EBUSY; in nfc_start_poll()
225 rc = dev->ops->start_poll(dev, im_protocols, tm_protocols); in nfc_start_poll()
226 if (!rc) { in nfc_start_poll()
233 return rc; in nfc_start_poll()
243 int rc = 0; in nfc_stop_poll() local
250 rc = -ENODEV; in nfc_stop_poll()
255 rc = -EINVAL; in nfc_stop_poll()
265 return rc; in nfc_stop_poll()
282 int rc = 0; in nfc_dep_link_up() local
295 rc = -ENODEV; in nfc_dep_link_up()
300 rc = -EALREADY; in nfc_dep_link_up()
306 rc = -EINVAL; in nfc_dep_link_up()
312 rc = -ENOTCONN; in nfc_dep_link_up()
316 rc = dev->ops->dep_link_up(dev, target, comm_mode, gb, gb_len); in nfc_dep_link_up()
317 if (!rc) { in nfc_dep_link_up()
324 return rc; in nfc_dep_link_up()
329 int rc = 0; in nfc_dep_link_down() local
339 rc = -ENODEV; in nfc_dep_link_down()
344 rc = -EALREADY; in nfc_dep_link_down()
348 rc = dev->ops->dep_link_down(dev); in nfc_dep_link_down()
349 if (!rc) { in nfc_dep_link_down()
360 return rc; in nfc_dep_link_down()
396 int rc; in nfc_activate_target() local
405 rc = -ENODEV; in nfc_activate_target()
410 rc = -EBUSY; in nfc_activate_target()
416 rc = -ENOTCONN; in nfc_activate_target()
420 rc = dev->ops->activate_target(dev, target, protocol); in nfc_activate_target()
421 if (!rc) { in nfc_activate_target()
432 return rc; in nfc_activate_target()
444 int rc = 0; in nfc_deactivate_target() local
452 rc = -ENODEV; in nfc_deactivate_target()
457 rc = -ENOTCONN; in nfc_deactivate_target()
462 rc = -ENOTCONN; in nfc_deactivate_target()
474 return rc; in nfc_deactivate_target()
491 int rc; in nfc_data_exchange() local
499 rc = -ENODEV; in nfc_data_exchange()
506 rc = -EADDRNOTAVAIL; in nfc_data_exchange()
514 rc = dev->ops->im_transceive(dev, dev->active_target, skb, cb, in nfc_data_exchange()
517 if (!rc && dev->ops->check_presence && !dev->shutting_down) in nfc_data_exchange()
521 rc = dev->ops->tm_send(dev, skb); in nfc_data_exchange()
523 rc = -ENOTCONN; in nfc_data_exchange()
531 return rc; in nfc_data_exchange()
549 int rc; in nfc_enable_se() local
556 rc = -ENODEV; in nfc_enable_se()
561 rc = -ENODEV; in nfc_enable_se()
566 rc = -EBUSY; in nfc_enable_se()
571 rc = -EOPNOTSUPP; in nfc_enable_se()
577 rc = -EINVAL; in nfc_enable_se()
582 rc = -EALREADY; in nfc_enable_se()
586 rc = dev->ops->enable_se(dev, se_idx); in nfc_enable_se()
587 if (rc >= 0) in nfc_enable_se()
592 return rc; in nfc_enable_se()
598 int rc; in nfc_disable_se() local
605 rc = -ENODEV; in nfc_disable_se()
610 rc = -ENODEV; in nfc_disable_se()
615 rc = -EOPNOTSUPP; in nfc_disable_se()
621 rc = -EINVAL; in nfc_disable_se()
626 rc = -EALREADY; in nfc_disable_se()
630 rc = dev->ops->disable_se(dev, se_idx); in nfc_disable_se()
631 if (rc >= 0) in nfc_disable_se()
636 return rc; in nfc_disable_se()
670 int rc; in nfc_tm_activated() local
677 rc = nfc_set_remote_general_bytes(dev, gb, gb_len); in nfc_tm_activated()
678 if (rc < 0) in nfc_tm_activated()
687 rc = nfc_genl_tm_activated(dev, protocol); in nfc_tm_activated()
692 return rc; in nfc_tm_activated()
874 int rc; in nfc_add_se() local
893 rc = nfc_genl_se_added(dev, se_idx, type); in nfc_add_se()
894 if (rc < 0) { in nfc_add_se()
898 return rc; in nfc_add_se()
908 int rc; in nfc_remove_se() local
914 rc = nfc_genl_se_removed(dev, se_idx); in nfc_remove_se()
915 if (rc < 0) in nfc_remove_se()
916 return rc; in nfc_remove_se()
931 int rc; in nfc_se_transaction() local
938 rc = -EPROTO; in nfc_se_transaction()
942 rc = nfc_genl_se_transaction(dev, se_idx, evt_transaction); in nfc_se_transaction()
945 return rc; in nfc_se_transaction()
951 int rc; in nfc_se_connectivity() local
956 rc = nfc_genl_se_connectivity(dev, se_idx); in nfc_se_connectivity()
958 return rc; in nfc_se_connectivity()
987 int rc; in nfc_check_pres_work() local
992 rc = dev->ops->check_presence(dev, dev->active_target); in nfc_check_pres_work()
993 if (rc == -EOPNOTSUPP) in nfc_check_pres_work()
995 if (rc) { in nfc_check_pres_work()
1056 int rc; in nfc_allocate_device() local
1069 rc = ida_alloc(&nfc_index_ida, GFP_KERNEL); in nfc_allocate_device()
1070 if (rc < 0) in nfc_allocate_device()
1072 dev->idx = rc; in nfc_allocate_device()
1112 int rc; in nfc_register_device() local
1118 rc = device_add(&dev->dev); in nfc_register_device()
1121 if (rc < 0) in nfc_register_device()
1122 return rc; in nfc_register_device()
1124 rc = nfc_llcp_register_device(dev); in nfc_register_device()
1125 if (rc) in nfc_register_device()
1140 rc = nfc_genl_device_added(dev); in nfc_register_device()
1141 if (rc) in nfc_register_device()
1156 int rc; in nfc_unregister_device() local
1160 rc = nfc_genl_device_removed(dev); in nfc_unregister_device()
1161 if (rc) in nfc_unregister_device()
1190 int rc; in nfc_init() local
1194 rc = class_register(&nfc_class); in nfc_init()
1195 if (rc) in nfc_init()
1196 return rc; in nfc_init()
1198 rc = nfc_genl_init(); in nfc_init()
1199 if (rc) in nfc_init()
1205 rc = rawsock_init(); in nfc_init()
1206 if (rc) in nfc_init()
1209 rc = nfc_llcp_init(); in nfc_init()
1210 if (rc) in nfc_init()
1213 rc = af_nfc_init(); in nfc_init()
1214 if (rc) in nfc_init()
1227 return rc; in nfc_init()