Lines Matching refs:ret
63 int ret; in msi_insert_desc() local
66 ret = xa_insert(&md->__store, index, desc, GFP_KERNEL); in msi_insert_desc()
67 if (ret) in msi_insert_desc()
69 return ret; in msi_insert_desc()
106 int ret; in msi_add_simple_msi_descs() local
114 ret = msi_insert_desc(dev->msi.data, desc, idx); in msi_add_simple_msi_descs()
115 if (ret) in msi_add_simple_msi_descs()
121 ret = -ENOMEM; in msi_add_simple_msi_descs()
124 return ret; in msi_add_simple_msi_descs()
200 int ret; in msi_setup_device_data() local
209 ret = msi_sysfs_create_group(dev); in msi_setup_device_data()
210 if (ret) { in msi_setup_device_data()
212 return ret; in msi_setup_device_data()
320 unsigned int ret = 0; in msi_get_virq() local
338 ret = desc->irq + index; in msi_get_virq()
340 ret = desc->irq; in msi_get_virq()
344 return ret; in msi_get_virq()
392 int ret, i; in msi_sysfs_populate_desc() local
403 ret = -ENOMEM; in msi_sysfs_populate_desc()
410 ret = sysfs_add_file_to_group(&dev->kobj, &attrs[i].attr, msi_irqs_group.name); in msi_sysfs_populate_desc()
411 if (ret) { in msi_sysfs_populate_desc()
420 return ret; in msi_sysfs_populate_desc()
431 int ret; in msi_device_populate_sysfs() local
436 ret = msi_sysfs_populate_desc(dev, desc); in msi_device_populate_sysfs()
437 if (ret) in msi_device_populate_sysfs()
438 return ret; in msi_device_populate_sysfs()
498 int ret; in msi_domain_set_affinity() local
500 ret = parent->chip->irq_set_affinity(parent, mask, force); in msi_domain_set_affinity()
501 if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) { in msi_domain_set_affinity()
507 return ret; in msi_domain_set_affinity()
536 int i, ret; in msi_domain_alloc() local
542 ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg); in msi_domain_alloc()
543 if (ret < 0) in msi_domain_alloc()
544 return ret; in msi_domain_alloc()
548 ret = ops->msi_init(domain, info, virq + i, hwirq + i, arg); in msi_domain_alloc()
549 if (ret < 0) { in msi_domain_alloc()
555 return ret; in msi_domain_alloc()
703 int ret; in msi_domain_prepare_irqs() local
705 ret = ops->msi_check(domain, info, dev); in msi_domain_prepare_irqs()
706 if (ret == 0) in msi_domain_prepare_irqs()
707 ret = ops->msi_prepare(domain, dev, nvec, arg); in msi_domain_prepare_irqs()
709 return ret; in msi_domain_prepare_irqs()
718 int ret, virq; in msi_domain_populate_irqs() local
721 ret = msi_add_simple_msi_descs(dev, virq_base, nvec); in msi_domain_populate_irqs()
722 if (ret) in msi_domain_populate_irqs()
730 ret = irq_domain_alloc_irqs_hierarchy(domain, virq, 1, arg); in msi_domain_populate_irqs()
731 if (ret) in msi_domain_populate_irqs()
745 return ret; in msi_domain_populate_irqs()
814 int ret; in msi_init_virq() local
838 ret = irq_domain_activate_irq(irqd, vflags & VIRQ_CAN_RESERVE); in msi_init_virq()
839 if (ret) in msi_init_virq()
840 return ret; in msi_init_virq()
859 int i, ret, virq; in __msi_domain_alloc_irqs() local
861 ret = msi_domain_prepare_irqs(domain, dev, nvec, &arg); in __msi_domain_alloc_irqs()
862 if (ret) in __msi_domain_alloc_irqs()
863 return ret; in __msi_domain_alloc_irqs()
892 ret = msi_init_virq(domain, virq + i, vflags); in __msi_domain_alloc_irqs()
893 if (ret) in __msi_domain_alloc_irqs()
894 return ret; in __msi_domain_alloc_irqs()
897 ret = msi_sysfs_populate_desc(dev, desc); in __msi_domain_alloc_irqs()
898 if (ret) in __msi_domain_alloc_irqs()
899 return ret; in __msi_domain_alloc_irqs()
934 int ret; in msi_domain_alloc_irqs_descs_locked() local
938 ret = msi_domain_add_simple_msi_descs(info, dev, nvec); in msi_domain_alloc_irqs_descs_locked()
939 if (ret) in msi_domain_alloc_irqs_descs_locked()
940 return ret; in msi_domain_alloc_irqs_descs_locked()
942 ret = ops->domain_alloc_irqs(domain, dev, nvec); in msi_domain_alloc_irqs_descs_locked()
943 if (ret) in msi_domain_alloc_irqs_descs_locked()
945 return ret; in msi_domain_alloc_irqs_descs_locked()
959 int ret; in msi_domain_alloc_irqs() local
962 ret = msi_domain_alloc_irqs_descs_locked(domain, dev, nvec); in msi_domain_alloc_irqs()
964 return ret; in msi_domain_alloc_irqs()