lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1c4e81eda5f9651f581f1554629d334f1afda841.1653227039.git.christophe.jaillet@wanadoo.fr>
Date:   Sun, 22 May 2022 15:44:17 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     dan.carpenter@...cle.com, Huacai Chen <chenhuacai@...nel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-mips@...r.kernel.org
Subject: [PATCH] irqchip/loongson-liointc: Fix an error handling path in liointc_init()

If a of_property_match_string() call fails, we still need to release some
resources.
Add the corresponding goto instead of a direct return.

Fixes: 807e93d0ecbb ("irqchip/loongson-liointc: Add ACPI init support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 drivers/irqchip/irq-loongson-liointc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
index ff3cb5b05710..2227b702a81d 100644
--- a/drivers/irqchip/irq-loongson-liointc.c
+++ b/drivers/irqchip/irq-loongson-liointc.c
@@ -185,8 +185,10 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
 			int index = of_property_match_string(node,
 					"reg-names", core_reg_names[i]);
 
-			if (index < 0)
-				return -EINVAL;
+			if (index < 0) {
+				err = -EINVAL;
+				goto out_iounmap;
+			}
 
 			priv->core_isr[i] = of_iomap(node, index);
 		}
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ