[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] xen/arm: domain_build: Check return code of domain_vpl011_init
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Wed, 22 Mar 2023 11:29:40 +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=oEHhl4OfY4C4g8mhIFlhppd+WY7/WJjjUQxWu0Sbqss=; b=CosUd/HsgZqrWM8gnbV/nZ/FJcEkRUhT0uYypuBoTm8uZbH9YCb0oopGaDZUWFzLGRqfXWjpLnCy59F0d90ha3gUtuPnjmT3wOSXTpfrhc4lxq27et17I8hgCXKYrCpgHMCMrHDlEAAkRZocsgv9pBZUjQBKXu+F+xQVmaJN5YsWa1tCjZzPh7ICB4GCaq7+yKP9iBmH2TQad0SKtAKeMHAqQ51vnAPZQAYOaPnweluzR8xE3Ku01OO3IRn623TwzNl3yqdWoE5wzIMhac8zuJl05L9xGK/GfkH7RiS41rauAFpIZJAkbZUTUKgIoLUCCRHoYXYolGDVRYDOMBb3og==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d8u0aotvnWd4qIZ/alH+c8fVfDLfzBnoZhIcE/4qKyyw0qWPLyop5h8uH45+CUgGuNuiWHm19jIHrWDAjhKtN3rrU4Fb0TIRhxzHcDz4i0kInxXq3c2a4jqykYmtu++y52N3ZfT2dov7/eppwTssUzWtSAspWm1rAs1lNY+Xhk00KPidVnI3o2pAGDVdwb/K4HGImiW4SvDqathiPLjk3rtE70Tvi4fjvbXfcjODfWE3TXz//MX7wEOl9K5LHOyBDdC0Eme7/gZAqiZJsmt6E5xs+/kPMGuVn76xkFgDr6w14xj2Qy68jOq2HnT4r+hKwfRFEwOdZVfmITzRD/qb9g==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Wed, 22 Mar 2023 10:30:00 +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>
---
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
|