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: <20240620085147.1097187-1-hongao@uniontech.com>
Date: Thu, 20 Jun 2024 16:51:47 +0800
From: hongao <hongao@...ontech.com>
To: rafael@...nel.org
Cc: lenb@...nel.org,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	hongao <hongao@...ontech.com>
Subject: [PATCH] ACPI: button: call input_free_device when input_register_device fails

Call input_free_device when input_register_device fails.

Signed-off-by: hongao <hongao@...ontech.com>

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index cc61020756be..8765e9a64404 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -602,8 +602,10 @@ static int acpi_button_add(struct acpi_device *device)
 
 	input_set_drvdata(input, device);
 	error = input_register_device(input);
-	if (error)
+	if (error) {
+		input_free_device(input);
 		goto err_remove_fs;
+	}
 
 	switch (device->device_type) {
 	case ACPI_BUS_TYPE_POWER_BUTTON:

base-commit: e5b3efbe1ab1793bb49ae07d56d0973267e65112
-- 
2.33.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ