Lines Matching refs:rc

47 	int rc = 0;  in nfc_fw_download()  local
54 rc = -ENODEV; in nfc_fw_download()
59 rc = -EBUSY; in nfc_fw_download()
64 rc = -EOPNOTSUPP; in nfc_fw_download()
69 rc = dev->ops->fw_download(dev, firmware_name); in nfc_fw_download()
70 if (rc) in nfc_fw_download()
75 return rc; in nfc_fw_download()
103 int rc = 0; in nfc_dev_up() local
110 rc = -ERFKILL; in nfc_dev_up()
115 rc = -ENODEV; in nfc_dev_up()
120 rc = -EBUSY; in nfc_dev_up()
125 rc = -EALREADY; in nfc_dev_up()
130 rc = dev->ops->dev_up(dev); in nfc_dev_up()
132 if (!rc) in nfc_dev_up()
141 return rc; in nfc_dev_up()
151 int rc = 0; in nfc_dev_down() local
158 rc = -ENODEV; in nfc_dev_down()
163 rc = -EALREADY; in nfc_dev_down()
168 rc = -EBUSY; in nfc_dev_down()
179 return rc; in nfc_dev_down()
211 int rc; in nfc_start_poll() local
222 rc = -ENODEV; in nfc_start_poll()
227 rc = -ENODEV; in nfc_start_poll()
232 rc = -EBUSY; in nfc_start_poll()
236 rc = dev->ops->start_poll(dev, im_protocols, tm_protocols); in nfc_start_poll()
237 if (!rc) { in nfc_start_poll()
244 return rc; in nfc_start_poll()
254 int rc = 0; in nfc_stop_poll() local
261 rc = -ENODEV; in nfc_stop_poll()
266 rc = -EINVAL; in nfc_stop_poll()
276 return rc; in nfc_stop_poll()
293 int rc = 0; in nfc_dep_link_up() local
306 rc = -ENODEV; in nfc_dep_link_up()
311 rc = -EALREADY; in nfc_dep_link_up()
317 rc = -EINVAL; in nfc_dep_link_up()
323 rc = -ENOTCONN; in nfc_dep_link_up()
327 rc = dev->ops->dep_link_up(dev, target, comm_mode, gb, gb_len); in nfc_dep_link_up()
328 if (!rc) { in nfc_dep_link_up()
335 return rc; in nfc_dep_link_up()
340 int rc = 0; in nfc_dep_link_down() local
350 rc = -ENODEV; in nfc_dep_link_down()
355 rc = -EALREADY; in nfc_dep_link_down()
359 rc = dev->ops->dep_link_down(dev); in nfc_dep_link_down()
360 if (!rc) { in nfc_dep_link_down()
371 return rc; in nfc_dep_link_down()
407 int rc; in nfc_activate_target() local
416 rc = -ENODEV; in nfc_activate_target()
421 rc = -EBUSY; in nfc_activate_target()
427 rc = -ENOTCONN; in nfc_activate_target()
431 rc = dev->ops->activate_target(dev, target, protocol); in nfc_activate_target()
432 if (!rc) { in nfc_activate_target()
443 return rc; in nfc_activate_target()
454 int rc = 0; in nfc_deactivate_target() local
462 rc = -ENODEV; in nfc_deactivate_target()
467 rc = -ENOTCONN; in nfc_deactivate_target()
472 rc = -ENOTCONN; in nfc_deactivate_target()
484 return rc; in nfc_deactivate_target()
501 int rc; in nfc_data_exchange() local
509 rc = -ENODEV; in nfc_data_exchange()
516 rc = -EADDRNOTAVAIL; in nfc_data_exchange()
524 rc = dev->ops->im_transceive(dev, dev->active_target, skb, cb, in nfc_data_exchange()
527 if (!rc && dev->ops->check_presence && !dev->shutting_down) in nfc_data_exchange()
531 rc = dev->ops->tm_send(dev, skb); in nfc_data_exchange()
533 rc = -ENOTCONN; in nfc_data_exchange()
541 return rc; in nfc_data_exchange()
559 int rc; in nfc_enable_se() local
566 rc = -ENODEV; in nfc_enable_se()
571 rc = -ENODEV; in nfc_enable_se()
576 rc = -EBUSY; in nfc_enable_se()
581 rc = -EOPNOTSUPP; in nfc_enable_se()
587 rc = -EINVAL; in nfc_enable_se()
592 rc = -EALREADY; in nfc_enable_se()
596 rc = dev->ops->enable_se(dev, se_idx); in nfc_enable_se()
597 if (rc >= 0) in nfc_enable_se()
602 return rc; in nfc_enable_se()
608 int rc; in nfc_disable_se() local
615 rc = -ENODEV; in nfc_disable_se()
620 rc = -ENODEV; in nfc_disable_se()
625 rc = -EOPNOTSUPP; in nfc_disable_se()
631 rc = -EINVAL; in nfc_disable_se()
636 rc = -EALREADY; in nfc_disable_se()
640 rc = dev->ops->disable_se(dev, se_idx); in nfc_disable_se()
641 if (rc >= 0) in nfc_disable_se()
646 return rc; in nfc_disable_se()
680 int rc; in nfc_tm_activated() local
687 rc = nfc_set_remote_general_bytes(dev, gb, gb_len); in nfc_tm_activated()
688 if (rc < 0) in nfc_tm_activated()
697 rc = nfc_genl_tm_activated(dev, protocol); in nfc_tm_activated()
702 return rc; in nfc_tm_activated()
881 int rc; in nfc_add_se() local
900 rc = nfc_genl_se_added(dev, se_idx, type); in nfc_add_se()
901 if (rc < 0) { in nfc_add_se()
905 return rc; in nfc_add_se()
915 int rc; in nfc_remove_se() local
921 rc = nfc_genl_se_removed(dev, se_idx); in nfc_remove_se()
922 if (rc < 0) in nfc_remove_se()
923 return rc; in nfc_remove_se()
938 int rc; in nfc_se_transaction() local
945 rc = -EPROTO; in nfc_se_transaction()
949 rc = nfc_genl_se_transaction(dev, se_idx, evt_transaction); in nfc_se_transaction()
952 return rc; in nfc_se_transaction()
979 int rc; in nfc_check_pres_work() local
984 rc = dev->ops->check_presence(dev, dev->active_target); in nfc_check_pres_work()
985 if (rc == -EOPNOTSUPP) in nfc_check_pres_work()
987 if (rc) { in nfc_check_pres_work()
1090 int rc; in nfc_register_device() local
1104 rc = device_add(&dev->dev); in nfc_register_device()
1107 if (rc < 0) in nfc_register_device()
1108 return rc; in nfc_register_device()
1110 rc = nfc_llcp_register_device(dev); in nfc_register_device()
1111 if (rc) in nfc_register_device()
1114 rc = nfc_genl_device_added(dev); in nfc_register_device()
1115 if (rc) in nfc_register_device()
1139 int rc, id; in nfc_unregister_device() local
1158 rc = nfc_genl_device_removed(dev); in nfc_unregister_device()
1159 if (rc) in nfc_unregister_device()
1176 int rc; in nfc_init() local
1180 rc = class_register(&nfc_class); in nfc_init()
1181 if (rc) in nfc_init()
1182 return rc; in nfc_init()
1184 rc = nfc_genl_init(); in nfc_init()
1185 if (rc) in nfc_init()
1191 rc = rawsock_init(); in nfc_init()
1192 if (rc) in nfc_init()
1195 rc = nfc_llcp_init(); in nfc_init()
1196 if (rc) in nfc_init()
1199 rc = af_nfc_init(); in nfc_init()
1200 if (rc) in nfc_init()
1213 return rc; in nfc_init()