* [PATCH] xen/mcelog: Use common error handling code in bind_virq_for_mce()
@ 2026-06-10 15:11 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2026-06-10 15:11 UTC (permalink / raw)
To: xen-devel, Jürgen Groß,
Oleksandr Tyshchenko, Stefano Stabellini
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 10 Jun 2026 17:05:22 +0200
Subject: [PATCH] xen/mcelog: Use common error handling code in bind_virq_for_mce()
Use an additional label so that a bit of exception handling can be better
reused at the end of an if branch.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/xen/mcelog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/mcelog.c b/drivers/xen/mcelog.c
index 53a8720f5cae..df15d5cf6d4c 100644
--- a/drivers/xen/mcelog.c
+++ b/drivers/xen/mcelog.c
@@ -380,14 +380,14 @@ static int bind_virq_for_mce(void)
ret = HYPERVISOR_mca(&mc_op);
if (ret) {
pr_err("Failed to get CPU info\n");
- kfree(g_physinfo);
- return ret;
+ goto free_info;
}
ret = bind_virq_to_irqhandler(VIRQ_MCA, 0,
xen_mce_interrupt, 0, "mce", NULL);
if (ret < 0) {
pr_err("Failed to bind virq\n");
+free_info:
kfree(g_physinfo);
return ret;
}
--
2.54.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-10 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 15:11 [PATCH] xen/mcelog: Use common error handling code in bind_virq_for_mce() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®