arch/powerpc/platforms/ps3/interrupt.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-)
In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements
and handle errors directly.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/ps3/interrupt.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index a4ad4b49eef7..358611638258 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -184,8 +184,7 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (!*virq) {
FAIL("%s:%d: irq_create_mapping failed: outlet %lu\n",
__func__, __LINE__, outlet);
- result = -ENOMEM;
- goto fail_create;
+ return -ENOMEM;
}
DBG("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__,
@@ -196,17 +195,13 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: irq_set_chip_data failed\n",
__func__, __LINE__);
- goto fail_set;
+ irq_dispose_mapping(*virq);
+ return result;
}
ps3_chip_mask(irq_get_irq_data(*virq));
return result;
-
-fail_set:
- irq_dispose_mapping(*virq);
-fail_create:
- return result;
}
/**
@@ -250,7 +245,7 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: ps3_virq_setup failed\n", __func__, __LINE__);
- goto fail_setup;
+ return result;
}
pd = irq_get_chip_data(*virq);
@@ -263,16 +258,11 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
__func__, __LINE__, ps3_result(result));
- result = -EPERM;
- goto fail_connect;
+ ps3_virq_destroy(*virq);
+ return -EPERM;
}
return result;
-
-fail_connect:
- ps3_virq_destroy(*virq);
-fail_setup:
- return result;
}
EXPORT_SYMBOL_GPL(ps3_irq_plug_setup);
On 2026/09/14 11:59 PM, Thorsten Blum wrote: > In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements > and handle errors directly. > > Signed-off-by: Thorsten Blum <blum@kernel.org> Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com> Thanks, Amit
On Mon, 14 Sept 2026 at 23:59, Thorsten Blum <blum@kernel.org> wrote:
> In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements
> and handle errors directly.
>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
© 2016 - 2026 Red Hat, Inc.