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: <20180201080805.8076-1-mnhu@prevas.dk>
Date:   Thu, 1 Feb 2018 09:08:05 +0100
From:   Martin Hundebøll <mnhu@...vas.dk>
To:     Jean Delvare <jdelvare@...e.com>, <linux-kernel@...r.kernel.org>
CC:     Martin Hundebøll <mnhu@...vas.dk>
Subject: [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems

dmi_init() rightfully checks if dmi is available at all, and errors out
if not. This leads to harmless errors being printed during boot on
non-efi systems, even when these are booted quietly.

Avoid this error-print by returning directly from dmi_init() if dmi
isn't available, instead of jumping to the err-label.

Signed-off-by: Martin Hundebøll <mnhu@...vas.dk>
---
 drivers/firmware/dmi_scan.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 783041964439..86c5e0625a08 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -715,10 +715,8 @@ static int __init dmi_init(void)
 	u8 *dmi_table;
 	int ret = -ENOMEM;
 
-	if (!dmi_available) {
-		ret = -ENODATA;
-		goto err;
-	}
+	if (!dmi_available)
+		return -ENODATA;
 
 	/*
 	 * Set up dmi directory at /sys/firmware/dmi. This entry should stay
-- 
2.16.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ