]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe()
authorFelix Gu <ustc.gu@gmail.com>
Sun, 15 Mar 2026 07:17:54 +0000 (15:17 +0800)
committerThomas Gleixner <tglx@kernel.org>
Tue, 17 Mar 2026 10:16:15 +0000 (11:16 +0100)
When riscv_acpi_get_gsi_info() fails, the mailbox channel previously
requested via mbox_request_channel() is not freed. Add the missing
mbox_free_channel() call to prevent the resource leak.

Fixes: 4752b0cfbc37 ("irqchip/riscv-rpmi-sysmsi: Add ACPI support")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Rahul Pathak <rahul@summations.net>
Link: https://patch.msgid.link/20260315-sysmsi-v1-1-5f090c86c2ca@gmail.com
drivers/irqchip/irq-riscv-rpmi-sysmsi.c

index 5c74c561ce316106ef4856921b55c41be47a809e..612f3972f7af038b1bac285e1c921a0532cdc6b6 100644 (file)
@@ -250,6 +250,7 @@ static int rpmi_sysmsi_probe(struct platform_device *pdev)
                rc = riscv_acpi_get_gsi_info(fwnode, &priv->gsi_base, &id,
                                             &nr_irqs, NULL);
                if (rc) {
+                       mbox_free_channel(priv->chan);
                        dev_err(dev, "failed to find GSI mapping\n");
                        return rc;
                }