Skip to content

Commit 76f0930

Browse files
outman119Thomas Gleixner
authored andcommitted
irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe()
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: 4752b0c ("irqchip/riscv-rpmi-sysmsi: Add ACPI support") Signed-off-by: Felix Gu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Reviewed-by: Rahul Pathak <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent f338e77 commit 76f0930

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/irqchip/irq-riscv-rpmi-sysmsi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ static int rpmi_sysmsi_probe(struct platform_device *pdev)
250250
rc = riscv_acpi_get_gsi_info(fwnode, &priv->gsi_base, &id,
251251
&nr_irqs, NULL);
252252
if (rc) {
253+
mbox_free_channel(priv->chan);
253254
dev_err(dev, "failed to find GSI mapping\n");
254255
return rc;
255256
}

0 commit comments

Comments
 (0)