davinci_cp_intc_base = ioremap(config->reg.start,
resource_size(&config->reg));
- if (WARN_ON(!davinci_cp_intc_base))
+ if (!davinci_cp_intc_base) {
+ pr_err("%s: unable to ioremap register range\n", __func__);
return -EINVAL;
+ }
davinci_cp_intc_write(0, DAVINCI_CP_INTC_GLOBAL_ENABLE);
irq_base = irq_alloc_descs(-1, 0, config->num_irqs, 0);
if (irq_base < 0) {
- pr_warn("Couldn't allocate IRQ numbers\n");
- irq_base = 0;
+ pr_err("%s: unable to allocate interrupt descriptors: %d\n",
+ __func__, irq_base);
+ return irq_base;
}
/* create a legacy host */
&davinci_cp_intc_irq_domain_ops, NULL);
if (!davinci_cp_intc_irq_domain) {
- pr_err("cp_intc: failed to allocate irq host!\n");
+ pr_err("%s: unable to create an interrupt domain\n", __func__);
return -EINVAL;
}