Skip to contentSkip to conversation

xenbus: fix error exit in xenbus_init()

PATCH In review Juergen Gross 2 participants 2 messages Aug 22, 2023 – Aug 27, 2023 Xen hypervisor interface

lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

PATCH 1/1 xenbus: fix error exit in xenbus_init()

In case an error occurs in xenbus_init(), xen_store_domain_type should be set to XS_UNKNOWN.

Fix one instance where this action is missing.

Fixes 5b3353949e89 ("xen: add support for initializing xenstore later as HVM domain")
---
 drivers/xen/xenbus/xenbus_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/xenbus/xenbus_probe.c +1 -1
index 639bf628389b..3205e5d724c8 100644
@@ -1025,7 +1025,7 @@ static int __init xenbus_init(void)
 			if (err < 0) {
 				pr_err("xenstore_late_init couldn't bind irq err=%d\n",
 				       err);
-				return err;
+				goto out_error;
 			}
 
 			xs_init_irq = err;
Signature · 1 line
2.35.3
reviewer Reviewed-by on v1 1/1
#1 lore raw

On 22.08.23 12:11, Juergen Gross wrote:

Hello Juergen

Quoted 10 lines

In case an error occurs in xenbus_init(), xen_store_domain_type should be set to XS_UNKNOWN.

Fix one instance where this action is missing.

Quoted 17 lines
---
  drivers/xen/xenbus/xenbus_probe.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/xenbus/xenbus_probe.c +1 -1
index 639bf628389b..3205e5d724c8 100644
@@ -1025,7 +1025,7 @@ static int __init xenbus_init(void)
  			if (err < 0) {
  				pr_err("xenstore_late_init couldn't bind irq err=%d\n",
  				       err);
-				return err;
+				goto out_error;
  			}
 
  			xs_init_irq = err;