xen/mcelog: Use common error handling code in bind_virq_for_mce()
Subsystems (2)
PATCH 1/1 xen/mcelog: Use common error handling code in bind_virq_for_mce()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/xen/mcelog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/mcelog.c +2 -2
@@ -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; }
Signature · 1 line
2.54.0