Skip to content

Commit 6c702da

Browse files
brglnsekhar
authored andcommitted
ARM: davinci: cp-intc: unify error handling
Instead of dumping stack traces, just print a specific error message in aintc driver. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
1 parent 9762d87 commit 6c702da

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/arm/mach-davinci/cp_intc.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config,
177177

178178
davinci_cp_intc_base = ioremap(config->reg.start,
179179
resource_size(&config->reg));
180-
if (WARN_ON(!davinci_cp_intc_base))
180+
if (!davinci_cp_intc_base) {
181+
pr_err("%s: unable to ioremap register range\n", __func__);
181182
return -EINVAL;
183+
}
182184

183185
davinci_cp_intc_write(0, DAVINCI_CP_INTC_GLOBAL_ENABLE);
184186

@@ -210,8 +212,9 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config,
210212

211213
irq_base = irq_alloc_descs(-1, 0, config->num_irqs, 0);
212214
if (irq_base < 0) {
213-
pr_warn("Couldn't allocate IRQ numbers\n");
214-
irq_base = 0;
215+
pr_err("%s: unable to allocate interrupt descriptors: %d\n",
216+
__func__, irq_base);
217+
return irq_base;
215218
}
216219

217220
/* create a legacy host */
@@ -220,7 +223,7 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config,
220223
&davinci_cp_intc_irq_domain_ops, NULL);
221224

222225
if (!davinci_cp_intc_irq_domain) {
223-
pr_err("cp_intc: failed to allocate irq host!\n");
226+
pr_err("%s: unable to create an interrupt domain\n", __func__);
224227
return -EINVAL;
225228
}
226229

0 commit comments

Comments
 (0)