[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/arm: domain_build: Check return code of domain_vpl011_init



commit 3643eed7d021b73e7fb87bcc4e999c3b0eba6d91
Author:     Michal Orzel <michal.orzel@xxxxxxx>
AuthorDate: Thu Mar 23 14:56:35 2023 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Mar 29 22:14:52 2023 +0100

    xen/arm: domain_build: Check return code of domain_vpl011_init
    
    We are assigning return code of domain_vpl011_init() to a variable
    without checking it for an error. Fix it.
    
    Fixes: 3580c8b2dfc3 ("xen/arm: if direct-map domain use native UART address 
and IRQ number for vPL011")
    Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
    Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 9707eb7b1b..3195c5b6d6 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -3826,7 +3826,11 @@ static int __init construct_domU(struct domain *d,
      * shall be done first.
      */
     if ( kinfo.vpl011 )
+    {
         rc = domain_vpl011_init(d, NULL);
+        if ( rc < 0 )
+            return rc;
+    }
 
     rc = prepare_dtb_domU(d, &kinfo);
     if ( rc < 0 )
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.