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

[PATCH v2 1/2] xen/arm: domain_build: Check return code of domain_vpl011_init


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 23 Mar 2023 14:56:35 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7VBmivoISHzCX6WblJCHDCa7l2kjScABzT2Aj/qIsOE=; b=FdhqERuDpGnaVpS6y+uf72O+FblI3RXjWfinkATP0c+csONdK6I0Y+UQW0i+33j41Mqt0UXrE9JVnZHBmzTmqnfpAA51YavuJuxj8s6txC1C5uox8drb1owglyBuLdqDoVszkrG9fUr3OskO58Q87nbzRfGJvk3nV97WsjnDr1WHmyKCYQXsvVf0r1gN4tGMzvjKm8gauzIsq2NEZPz46/dfpejiWv8k8A/MWy/DMK+2kzLR9pikyKyIpowdsQ7Uc6V2z2gKrPb+RJ4ejA3rFHGLORpyf81Fnr4a9a4jZlVlx5tIFR+JayUabwxwvMZVBuOOfjBTAT3IiMNeDocrKw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G8jcm2gwTREW6O8Y4u8x2sP6CLbUMYRWFr2q5z6RH1MGawSdRBkeceCZ+uCzvslcW5f2VIbkAG3L2sb/JRfdP5NXFDg09/jpDcNER4+BYQJNUE4OzsaMBOon9+VvO2CcW04CdLW0eWtuC3xmPLXlcncsnKNe5pHOExOLRqYFsEBkvTSMc653SCaCuvLhfL4MSArjTIfgm86mXshBWtNG7xVd2zpcY/5E9WEM1jPhJOYcFppZQmQbd5V2s9ht0EWEUXy6UBeUiEaMHsfw5dV1VXzojr+z9ml7rFyXVZLG3w+vJfF+pxBinwzXC6YCUq198+cr41m3Wx3wovM7rz1mXA==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Thu, 23 Mar 2023 13:57:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>
---
Changes in v2:
 - none
---
 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 9707eb7b1bb1..3195c5b6d6ac 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 )
-- 
2.25.1




 


Rackspace

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