diff mbox series

xenbus: fix error exit in xenbus_init()

Message ID 20230822091138.4765-1-jgross@suse.com (mailing list archive)
State Accepted
Commit 9a1f998b2ed60005f8c72efef848cadce8d4c575
Headers show
Series xenbus: fix error exit in xenbus_init() | expand

Commit Message

Jürgen Groß Aug. 22, 2023, 9:11 a.m. UTC
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")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202304200845.w7m4kXZr-lkp@intel.com/
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/xen/xenbus/xenbus_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Oleksandr Tyshchenko Aug. 27, 2023, 8:14 a.m. UTC | #1
On 22.08.23 12:11, Juergen Gross wrote:


Hello Juergen

> 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")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://urldefense.com/v3/__https://lore.kernel.org/r/202304200845.w7m4kXZr-lkp@intel.com/__;!!GF_29dbcQIUBPA!yVqmbWu6uGrgCl2HVOApItVysZdzPQdL0WxeFK9vVHe5rPbI6B4uQvdoYcEeAQvXTJUrae9KNyQk_JBW1QVL$ [lore[.]kernel[.]org]
> Signed-off-by: Juergen Gross <jgross@suse.com>


Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>


> ---
>   drivers/xen/xenbus/xenbus_probe.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> index 639bf628389b..3205e5d724c8 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -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;
diff mbox series

Patch

diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 639bf628389b..3205e5d724c8 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -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;