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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191029032142.GA6758@saurav>
Date:   Tue, 29 Oct 2019 08:51:42 +0530
From:   Saurav Girepunje <saurav.girepunje@...il.com>
To:     linux@...linux.org.uk, joern@...ybastard.org, dwmw2@...radead.org,
        computersforpeace@...il.com, marek.vasut@...il.com,
        miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
        saurav.girepunje@...il.com, gregkh@...uxfoundation.org,
        tglx@...utronix.de, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Cc:     saurav.girepunje@...mail.com
Subject: [PATCH] mtd: devices: phram.c: Fix use true/false for bool type

Return type for security_extensions_enabled() is bool
so use true/false.

Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
---
 arch/arm/mm/nommu.c         |  2 +-
 drivers/mtd/devices/phram.c | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 24ecf8d30a1e..1fed74f93c66 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -56,7 +56,7 @@ static inline bool security_extensions_enabled(void)
 	if ((read_cpuid_id() & 0x000f0000) == 0x000f0000)
 		return cpuid_feature_extract(CPUID_EXT_PFR1, 4) ||
 			cpuid_feature_extract(CPUID_EXT_PFR1, 20);
-	return 0;
+	return true;
 }
 
 unsigned long setup_vectors_base(void)
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 86ae13b756b5..931e5c2481b5 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -239,27 +239,26 @@ static int phram_setup(const char *val)
 
 	ret = parse_name(&name, token[0]);
 	if (ret)
-		goto exit;
+		return ret;
 
 	ret = parse_num64(&start, token[1]);
 	if (ret) {
+		kfree(name);
 		parse_err("illegal start address\n");
-		goto parse_err;
 	}
 
 	ret = parse_num64(&len, token[2]);
 	if (ret) {
+		kfree(name);
 		parse_err("illegal device length\n");
-		goto parse_err;
 	}
 
 	ret = register_device(name, start, len);
 	if (!ret)
 		pr_info("%s device: %#llx at %#llx\n", name, len, start);
+	else
+		kfree(name);
 
-parse_err:
-	kfree(name);
-exit:
 	return ret;
 }
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ